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)
        strSQL = "update tblCustomers set Customer_Name='" & Replace(Request("Customer_Name"), "'", "''")
        strSQL += "' where Customer_ID = " & Request("Customer_ID")

        objCommand = New OleDbCommand(strSQL, objConnection)
        objCommand = Nothing
        objConnection = Nothing
      End Sub


<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>

</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)

8 Years
Discussion Span
Last Post by Ramesh S

Hi Stretcher,

Welcome to DaniWeb.

Use code tags to format your code.

Why do you use Request object to get the value of TextBox control. You can use like TextBox1.Text to get the value of it.

Also you are using <form> tag inside the server controls. Basically the ASP.NET controls should be surrounded by <form> tag.

To get the value of Customer_Name textbox value from Request object, try this


Edited by Ramesh S: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.