Here is my issue.....
I have an aspx page that has a button on it named save....
I also have an ultraWebTab control that has three tabs. In each of those tabs is a user control. On those user controls I have various textboxes, listboxes, etc.
Here is some code that loads fourtext boxes with values when the page loads.
This works just fine. :)
Now the issue. When I change a value in a text box and click the save button there is a postback and I try to get the value of the text box. I am getting A value but not my CHANGED value. In other words, when I first set the textbox (tbDocumentName) to say "Test Document". Then, I change it in the UI to "My New Improved Test Document" and click the SAVE button, I get the original value ("Test Document") not the new value ("My New Improved Test Document")
Here is the code I use on the save button click event.
'These get each of the three tabs in the ultra web tab controlDim tabGeneral As Infragistics.WebUI.UltraWebTab.Tab = Me.uwtProperties.Tabs.FromKey("General")Dim tabProduct As Infragistics.WebUI.UltraWebTab.Tab = Me.uwtProperties.Tabs.FromKey("ProductInfo")Dim tabOther As Infragistics.WebUI.UltraWebTab.Tab = Me.uwtProperties.Tabs.FromKey("Other")
'This is returning the original value instead of the change that I madeoDocInfo.Name = CType(tabGeneral.FindControl("tbDocumentName"), System.Web.UI.WebControls.TextBox).Text.ToString
Any help would be appreciated.
Thanks in advance.
Hello,
I believe this might be a page-lifecyle issue - at the moment of checking (Load) the new text is not yet set for the textbox, because change events happens after load.
I can suggest subscribing to the OnTextChanged event of the TextBox and getting the new value from the event handler.
Example:
<asp:TextBox runat="server" ID="TextBox1" OnTextChanged="TextChanged" />