Link to home
Start Free TrialLog in
Avatar of zachvaldez
zachvaldezFlag for United States of America

asked on

CommandArgument for a texbox control inside a repeater

Can  I do a commandargument on a textbox like this?
 <asp:TextBox ID="TextBox1" runat="server" class="css_input_type" value="0" maxlength="15"onkeypress="return disableEnterKey(event)" commandargument='<%#Eval("ACCOUNT") %>'></asp:TextBox>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zachvaldez

ASKER

Can I do an Insert Stored procedure in this event?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
just like in your code
protected void rpt_ItemCommand(object sender, RepeaterCommandEventArgs e)
{
TextBox tb1 = (TextBox)e.Item.FindControl("Textbox1");
//you can now access, tb1.Text, tb1.Tag, etc.

//Insert an insert stored procedure routine here...
}

Open in new window

Thanks!