473,287 Members | 3,240 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

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

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
2 1371
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
Thank you, it helped me !!

May 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Phil Powell | last post by:
Dim brinksterAdRemoveRegexp set brinksterAdRemoveRegexp = new RegExp brinksterAdRemoveRegexp.Pattern = "(<!-{2,}*BEGIN.+*END.+PLEASE REMOVE*-{2,}>)" brinksterAdRemoveRegexp.Global = TRUE...
2
by: Tee | last post by:
what's the differences between "Overrides Sub OnError" and "Sub Page_Error" ?
2
by: John Spiegel | last post by:
Hi all, I'm looking for suggestions on storing classifications of application settings in a WinForms app. I've got a couple ideas using XML config files. One is to have a set of .config files...
2
by: Yannick Turgeon | last post by:
Hello, I'm using A97 (french version) on XP (english version). Since this afternoon, all the Access built-in french-equivalent function are generating a "Sub or Function not defined" error. An...
7
by: zheetee | last post by:
<script type="text/vbscript"> sub setTextBoxValue(a1,a2) thedelete.deleteTextBox.value = a1 end sub </script> <td> <a href="#"...
23
blyxx86
by: blyxx86 | last post by:
Hey everyone, I'm working on a new database system to generate reports on the work technicians are doing and what their overall Pass/Fail rate is. I have the majority of the database set up and...
2
by: BadFeeling | last post by:
Hi all, I have started with css some months ago, and though I'm feeling more and more safe and comfortable, some parts of css still don't make perfect sense to me. Right now I have this...
2
AutumnsDecay
by: AutumnsDecay | last post by:
Hey there. I'm doing a website for a someone and I want to try something I've never tried before. However, I'm getting some trouble. With Javascript, I'm able to dynamically make text appear...
3
by: eBob.com | last post by:
How does a "sub-form", i.e. one invoked by another form, determine anything about the form which brought it into existence, i.e., I suppose, instantiated it? I wanted to so something like this ......
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.