473,379 Members | 1,253 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,379 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 1375
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 ......
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.