问下使用DROPLIST的AUTOPOSTBACK的问题
我想对一个表的状态进行更改不用修改按钮直接使用droplist的autopostback的功能。表的显示如下:编号,用户名,申请状态 
                                                             1            小明            未通过 
                                                             2               小红         已通过 
 我点droplist将未通过改成已通过使用的autopostback功能在页面重新加载时进行更新数据库操作。问题是如何读取ID。ASP我会到了.net里不会。我要通过在page_load里通过ID来知道要更新哪一条数据。我的数据表显示用GRIDVIEW控件的。
------解决方案--------------------将dropdownlist的autopostback设置为true。 
 同时在dropdownlist的SelectedIndexChanged()方法中写代码: 
 获取选定的id。可以直接用dropdownlist.selectedIndex来获取 
 获取id后。另外你想做什么操作直接写就可以了 
------解决方案--------------------在你的页面上加一个 
  <input type= "hidden " runat= "server " id= "hidden1 " />  
 给dropdownlist加个脚本事件 
  <asp:DropDownList ID= "DropDownList1 " runat= "server " AutoPostBack= "true " onchange= "javascript:getid(this) "  OnSelectedIndexChanged= "DropDownList1_SelectedIndexChanged ">  
 ... 
 事件 
  <script type= "text/javascript ">   
     function getid(obj) 
     { 
        document.getElementById( "hidden1 ").value = (obj.parentElement.previousSibling.previousSibling.innerHTML); 
     } 
  </script>    
 每次回刷后台id就是 this.hidden1.Value