Problems retrieving data from form

D

Doug Partridge

Does anyone see what is wrong with the below code?

File Test1.ASP

<HTML>
<Form action="test2.asp" method="post" ID="frm1">
<input type = "text" ID="txtname">
<Input type="submit" id="submit" value="submit">
</Form>
</HTML>

File Test2.ASP

<HTML>
<%
strname = Request.Form.Item("txtname")
Response.Write (strname)
Response.Write "Hello"
%>
</HTML>

The form submits, however, I only see the "Hello", but do not see the
Response.Write of the "strname" variable. Any ideas?

- doug
 
D

Doug Partridge

Figured it out ... the tag from Test1.ASP should be:

<input type = "text" name="txtname">

in order to retrieve the posted value.

- doug
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top