I have a form the has some textbox controls. I have a script to request these control values to update a table in my database. The problem I am having is that I added the textbox controls to inside the TabContainer and now the request does not see any values. Below is my form and my script code:
<script runat="server"> Sub Change_Customer(ByVal sender As Object, ByVal e As System.EventArgs) objConnection = New OleDbConnection(strConnection) objConnection.Open() strSQL = "update tblCustomers set Customer_Name='" & Replace(Request("Customer_Name"), "'", "''") strSQL += "' where Customer_ID = " & Request("Customer_ID") objCommand = New OleDbCommand(strSQL, objConnection) objCommand.ExecuteNonQuery() objCommand = Nothing objConnection.Close() objConnection = Nothing End Sub </script> <asp:ScriptManager id="ScriptManager1" runat="server" /> <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" > <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Customer Information" ><ContentTemplate> <FORM runat="server"> <asp:TextBox class=textbox id=Customer_Name runat="server" MaxLength="65" CssClass="input_text" size="60"></asp:TextBox> <asp:Button class=submit id=updatebutton onclick=Change_Customer runat="server" tooltip="Click to update" Text="Update"></asp:Button> </FORM> </cc1:TabPanel><BR><cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Ship To Addresses"><BR></cc1:TabPanel><BR></cc1:TabContainer>
When the textbox is outside the TabContainer it works fine. In the container the request value is blank. How do I update my table with the value of the textbox in the TabContainer?
I need to know how to find the textbox controls in the AJAX tab container so I can use the value to update the field in the table. Please show a sample code please.
Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)