p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Professional (http://p2p.wrox.com/forumdisplay.php?f=63)
-   -   Get the Id of Control in ASP (http://p2p.wrox.com/showthread.php?t=43897)

rekha_jsr June 13th, 2006 02:55 AM

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

woodyz June 13th, 2006 05:54 PM

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

rekha_jsr June 14th, 2006 07:37 AM

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


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

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