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

ASP.NET程序中常用的三十三种代码_NET教程-零度空间
ASP.NET程序中常用的三十三种代码_NET教程
此内容为付费资源,请付费后查看
618
暂时无法购买,请与站长联系
您当前未登录!建议登陆后购买,可保存购买订单
付费资源

资源名称: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

© 版权声明
THE END
喜欢就支持一下吧
点赞9打赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容