you want to display a msgbox on the server side? why?
解决方案 »
- GridView在配置数据源时,新建连接,测试成功,但下一步时,指定来自表或视图的列为灰色,没法选择,如图
- aspx页面中的<%为何变成<了
- select * from GoodsInfo where pid=' 矿泉水 ' or address like ' 广州 ' 那错了?
- 定义了一个SESSION
- TreeView 部署后不能显示图标的解觉方法
- css样式表无效!
- 求教运行网页时发生"未将对象引用设置到对象的实例",似乎和未读取到cookies有关,请教是怎么回事?
- aspx可以使用模块或处理器等方法来拦截HTTP请求,那有没有类似的简易方法拦截FTP请求呢?
- 我把我全部的分都拿出来了,帮我看一个datalist的问题吧!!
- 在asp.net中怎么实现一次上传任意张图片?(用C#),谢谢!
- 请高手看一看错在什么地方?
- Asp.Net中的公共函数调用
SqlDataAdapter myadapter=new SqlDataAdapter("select*from"&dropdownlist.selecteditem.value,myconn);
DataSet ds=new DataSet();
myadapter.Fill(ds,"t_Department");
因为在数据库中可能没有dropdownlist所选择的表,所以执行到myadapter.Fill(ds,"t_Department");时就会出错,我想在出错时在客户端弹出错误提示,我该怎么做?
{myadapter.Fill(ds,"t_Department");}
catch
{
Page.RegisterStartupScript("warnings", "<script>alert('提示!');</script>");
}
用这种方法,能不能得到提示框上的按钮事件,比如我想按了"确定"后,调用另一页面
Page.RegisterStartupScript("warnings", "<script>confirm('提示!');</script>");
---判断他有没有确定
RegisterClientScriptBlock()
注册一个客户端函数,然后在后台传入参数
比如
<script>
function changeurl(url)
{
if(url!=null)
window.location.href=url;
}</script>