开发者

Passing Command Arugments with textChanged

I am very new to .net, so please bear with me. I have a gridview that has a textbox and a label in each row. The textbo开发者_如何学JAVAx displays the sort id number that the user can change. The function I wrote that actually performs the changes needs two things passed to it in order to work. The first is the new sort id number, which is easy enough to get from the textchanged event. The second item it needs is the value of the label next to the changed text box. I know things like LinkButton have a CommandArgument option, and I don't think textchanged events do. Is there any way to get this information using gridview or some other method? Here is the code for the text itself:

<asp:TextBox ID="OrderNum" runat="server" Width="25px" Text='<%#Eval("Order")%>' OnTextChanged='OrderChange'  ToolTip="Change Default Order" ></asp:TextBox>


Finally Got this figured out if anyone else was having an issue with this.

TextBox box = ((TextBox)(sender));
string CountryCode=((Label)box.Parent.FindControl("CountryCode")).Text;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜