记录自己不会的地方---webform中基于表格的基础上获取其中文本框的值

 1  <td>
 2                            
 3                             <asp:TextBox  ID="txtOr" runat="server" Text='<%#Eval("au_TorgId") %>' />
 4                            <asp:Button ID="Button1" runat="server" Text="保存" CommandArgument='<%#Eval("au_ID") %>' CommandName="btnUpdate" /></td>
 5 
 6 
 7 
 8  string Id = e.CommandArgument.ToString();
 9              TextBox txt=null;
10             if (e.CommandName=="btnUpdate")
11             {
12                 txt = e.Item.FindControl("txtOr") as TextBox;
13             }

 

posted @ 2018-02-22 18:27  nssp  阅读(490)  评论(0编辑  收藏  举报