Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How can we access a text box in a "sub" that has been created in another "sub" dynamically

Reply
Thread Tools

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

 
 
loga123
Guest
Posts: n/a
 
      05-20-2006
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

 
Reply With Quote
 
 
 
 
Lau Lei Cheong
Guest
Posts: n/a
 
      05-20-2006
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" <>
???????: 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
>



 
Reply With Quote
 
 
 
 
loga123
Guest
Posts: n/a
 
      05-20-2006
Thank you, it helped me !!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
how to know which dynamically created linkbutton has been clicked? Bob ASP .Net 3 04-02-2009 10:19 AM
Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is also dynamically created) dickster ASP .Net Building Controls 0 12-08-2005 09:32 AM



Advertisments