how to show/know the key name and value ?

M

Michael

Hi,

I am writting a ASP which will accept lots of data from user interface page.
Is there a way that show me the each field or key name and value?

For example;
From the user interface page, the code is like this
<Form name="my_form" action="my_action.asp" .....>
... ...
<input type="Text" name="Text1" value="123">
<input type="Text" name="Text2" value="aaa">
<input type="Text" name="Text3" value="bbbb">
... ....

</Form>

There are maybe many many data fields to be shown on the page

Then I want "my_action.asp" can show my the data like this way:

Text1='123'
Text2='aaa'
Text3='bbbbb'

I tried to use Response.Write request.forms() .., but it only shows me the
value, how to show the key name?

Kindly please tell me how to code it.

Thanks

Michael
 
M

Michael

hi,

tried, not it is not working, error msg is "Invalid character ...
Response.Write q ...."

thx
 
M

Michael

hi,

got it, it works now.

the code is like this

For i=1 to Request.Form.Count
response.write i & ". " Response.Write Request.Form.Key(i) & " = " &
Request.FORM.Item(i) & "<BR>"
Next


Thank you very much

Michael
 
X

xFriday

Hello Michael,

Iv tried making it smaller and less confusing.

See if it works.

For each item in Request.Form
response.write item & " : " Response.Write Request.Form(item) & " <BR> "
Next

HTH,

Naveen Bhalla
http://www.xfriday.com/general/
Get Software Development Project leads for free.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top