| | |
AJAX Tab Control
Please support our ASP.NET advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 5
Reputation:
Solved Threads: 0
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:
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.
Thanks
ASP.NET Syntax (Toggle Plain Text)
<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.
Thanks
Last edited by peter_budo; Oct 27th, 2009 at 10:46 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
•
•
Join Date: Jun 2009
Posts: 452
Reputation:
Solved Threads: 82
0
#2 Oct 26th, 2009
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
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
ASP.NET Syntax (Toggle Plain Text)
Request("TabContainer1$TabPanel1$Customer_Name")
Last edited by Ramesh S; Oct 26th, 2009 at 6:56 am.
![]() |
Similar Threads
- Creating a Tab Control (C++)
- tab control (ASP.NET)
- How do I show Tab control on my form in Win XP style Look? (VB.NET)
- How to code "tab control' in the web form in ASP.NET / VB.NET ? (ASP.NET)
- Problem: Programming Tab Control (Visual Basic 4 / 5 / 6)
- tab control (tabPage) (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: check offline/online mode
- Next Thread: How to use a css templete in asp.net
Views: 689 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax appliances application asp asp.net beginner box browser businesslogiclayer button c# cac chat checkbox child class compatible complex content contenttype control countryselector courier database datagrid datagridview datalist deployment development dgv dialog dropdown dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv folder form gridview gudi identity iis image javascript languages list maps menu mobile mssql nameisnotdeclared novell opera order problem profile ratings redirect refer registration relationaldatabases response.redirect rows search security select serializesmo.table sessionvariables silverlight smoobjects software sql ssl tracking treeview typeof validatedate validation vb vb.net vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment wizard xsl





