Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 13th, 2006, 02:55 AM
Authorized User
 
Join Date: Sep 2004
Location: Delhi, Delhi, India.
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Get the Id of Control in ASP

Hi All,

I want to get the ID of HTML Controls from the FORM collection.

<input type=text name="name" Id="001" >

I want the ID 001 when the form is submitted.


Thanks in advance.



It is always safe to assume, not that the old way is wrong, but that there may be a better way...
*************************
Rekha
__________________
It is always safe to assume, not that the old way is wrong, but that there may be a better way...
*************************
Rekha
Reply With Quote
  #2 (permalink)  
Old June 13th, 2006, 05:54 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The id is not made available to your server side code - for your request.form object will not contain any trace of it. You need to use the name attribute to identify values in request.form.

The Id is purely a client side attribute. It can be used by the client side javascript, and therefore passed back to the server via some hidden input variable (along with the value contained in the text field), but I don't think this is what you are asking to do. And probably won't be of much use, anyway.

Woody Z http://www.learntoprogramnow.com
Reply With Quote
  #3 (permalink)  
Old June 14th, 2006, 07:37 AM
Authorized User
 
Join Date: Sep 2004
Location: Delhi, Delhi, India.
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks woodyz,

I don't have such requirement. I just wanted to know if it is possible.


It is always safe to assume, not that the old way is wrong, but that there may be a better way...
*************************
Rekha
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting id of a control in javascript sudhir164 Javascript How-To 2 February 23rd, 2008 05:35 AM
Passing asp control id to javascript jazzcatone ASP.NET 1.0 and 1.1 Professional 0 October 18th, 2006 01:38 PM
Master pages &server control ID - asp.net 2.0 tech user C# 2005 1 August 3rd, 2006 04:31 AM
why not index.asp?id=1 can be www.myweb.com/?id=1 BurhanKhan Classic ASP Professional 11 September 6th, 2004 02:06 PM



All times are GMT -4. The time now is 04:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.