`
rkui12rkui
  • 浏览: 12424 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

ASP.NET弹出一个对话框

阅读更多

  i am now in university(HIT@Weihai). if you have any question or you want to contact me, use this e-mail : xq.1990.weihai@gmail.com. i'd like to make friends with "techincal人s'. sina :skin1" allowScriptAccess="sameDomain" type="application/x-shockwave-flash">.you can talk to me :
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  (1) 点击页面上的按钮,弹出一个对话框提示是“确定”还是“取消”操作,我们采用在按钮中添加属性来完成: 
  举例如下: 
  public System.Web.UI.WebControls.Button btnDelRow; 
  btnDelRow.Attributes.Add("onclick", "return confirm('确定要删吗?');");
  (2) 对于页面完成一个操作后,弹出一个对话框提示是否“操作成功”。 
  举例如下: 
  Response.Write("alert('删除成功!')"); 
  (3)允许 ASP.NET 服务器控件在 Page 中发出客户端脚本块: 
  public virtual void RegisterStartupScript(string key,string script);
  举例如下: 
  if(!this.IsStartupScriptRegistered("hello")) 
  this.RegisterStartupScript("hello","alert('你好!')"); 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics