By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,963 Members | 1,474 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,963 IT Pros & Developers. It's quick & easy.

How can we access a text box in a "sub" that has been created in another "sub" dynamically

P: n/a
Hi All,

I am new to .net. I am creating a text box in a "button1" "click
event" dynamically based on user input. Name of the text box and ID of
the text box contro are set dynamically in the server side code.
How can make this text box accessable in another "sub" or "button2"
click event?
Any help is greatly appreciated.'

thanks

May 20 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If you know the ID, you can use Page.FindControl() to find it out and cast
it using CType().

Alternatively, if you just need the TextBox's value, you can just use
Request.Form["The control ID"] to retrieve.

"loga123" <vd**********@covansys.com>
???????:11**********************@i39g2000cwa.googl egroups.com...
Hi All,

I am new to .net. I am creating a text box in a "button1" "click
event" dynamically based on user input. Name of the text box and ID of
the text box contro are set dynamically in the server side code.
How can make this text box accessable in another "sub" or "button2"
click event?
Any help is greatly appreciated.'

thanks

May 20 '06 #2

P: n/a
Thank you, it helped me !!

May 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.