Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox GET & SET
Message
 
To
17/12/2002 16:33:08
Larry Long
ProgRes (Programming Resources)
Georgia, United States
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00733837
Message ID:
00733889
Views:
27
>When I step through the code, apparently the Text value hasn't been updated yet, because it's still empty. I know I could do it by adding another object like an OK button and assign the variable there, but is there a way to do it without adding another object?
>

Hmm...That works OK on my side. I would double check to make sure that your textbox is really named "TextBox". Since it's not working, you can try doing this another way. Every event passes in an object reference from the calling control. If you reference this control (eg. sender), you can get the new text value.
private void TextBox_TextChanged(object sender, System.EventArgs e)
{   
   System.Web.UI.WebControls.TextBox myControl = (System.Web.UI.WebControls.TextBox) sender;
   Session["helloname"] = myControl.Text;
   Server.Transfer("Form2.aspx");
}
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform