473,385 Members | 1,876 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,385 software developers and data experts.

collecting html control IDs on a form

Sorry about the previous question.

The thing I am really trying to do is collecting HTML id's on a given form.
As you may know, ASP.NET control ids do not necessarily match html control
names when the HTML page is output.

For example, if a textbox is contained in a user control, the user control's
ID is appended. For example, the user control is named "MyUserControl" and
the textbox's ID "txtTextBox". The name in the html output is
"MyUserControl:txtTextBox".

So is there a way to collect all those html Id's on a webform?
Nov 18 '05 #1
2 1031
Use the ClientID and the NamingContainer properties in conjunction.
"David" <sp************@spammersgohome.com> wrote in message
news:Re*******************@twister.socal.rr.com...
Sorry about the previous question.

The thing I am really trying to do is collecting HTML id's on a given form. As you may know, ASP.NET control ids do not necessarily match html control
names when the HTML page is output.

For example, if a textbox is contained in a user control, the user control's ID is appended. For example, the user control is named "MyUserControl" and the textbox's ID "txtTextBox". The name in the html output is
"MyUserControl:txtTextBox".

So is there a way to collect all those html Id's on a webform?

Nov 18 '05 #2
You can use UniqueID to get the htmlid of any control in asp.net.

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"David" <sp************@spammersgohome.com> wrote in message
news:Re*******************@twister.socal.rr.com...
Sorry about the previous question.

The thing I am really trying to do is collecting HTML id's on a given form. As you may know, ASP.NET control ids do not necessarily match html control
names when the HTML page is output.

For example, if a textbox is contained in a user control, the user control's ID is appended. For example, the user control is named "MyUserControl" and the textbox's ID "txtTextBox". The name in the html output is
"MyUserControl:txtTextBox".

So is there a way to collect all those html Id's on a webform?

Nov 18 '05 #3

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

Similar topics

2
by: serge calderara | last post by:
dear all, I am building an application which is collecting data from a database and display them in a windows form. My idea is to collect those data in a form that, they can be read by my...
1
by: Mike Kingscott | last post by:
Hi all, I have an app that allows users to upload files to my site, and then download them at a later date. Once the files have been safely uploaded, I wish to give them a download code to...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
17
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
0
by: Michael Mitchell via DotNetMonster.com | last post by:
* I need to collect the input data on example1.aspx by hitting the review button. * Out put the data in the corresponding Labels on Example2.aspx. * Save Example2.aspx to a File of the users choice...
2
by: Chad | last post by:
In our application, I would like to send out HTML mail. TO do so, I must do something like this: Mail.Body = <raw HTMLTEXT String> Hence, I would like to know how to get the HTML text for Web...
12
by: pmclinn | last post by:
How would you access a cookie value from a windowsform? This is how I do it from asp.net: If Not Request.Cookies("RunNodeReport") Is Nothing Then ...
17
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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.