您好!欢迎来到资源站!本站资源24小时自动发货,海量精品课程资源免费下载!

ASP.NET程序中常用的三十三种代码_NET教程下载

0.0/180 人
4

更新:2023-11-29

分类:NET教程

评论:0

 

开通vip

资源名称:ASP.NET程序中常用的三十三种代码

内容简介:

  1. 打开新的窗口并传送参数:
      传送参数:
    response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+…+"’)</script>")
      接收参数:
    string a = Request.QueryString("id");
    string b = Request.QueryString("id1");
      2.为按钮添加对话框
    Button1.Attributes.Add("onclick","return confirm(’确认?’)");
    button.attributes.add("onclick","if(confirm(’are you sure…?’)){return true;}else{return false;}")
      3.删除表格选定记录
    int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex];
    string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString()
      4.删除表格记录警告
    private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e)
    {
     switch(e.Item.ItemType)
     {
      case ListItemType.Item :
      case ListItemType.AlternatingItem :
      case ListItemType.EditItem:

资源截图:

2019-03-28_101757.png


也想出现在这里?联系我们
网盘
- MB
版权说明:仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。我们非常重视版权问题,如有侵权请邮件(97128995#qq.com)与我们联系处理。敬请谅解!
开通vip
首页 导航 会员 客服 微信
QQ 微信 邮箱 TOP