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

Problems retrieving data from form

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

Jul 19 '05 #1
2 1905
Try this:

strname = Request.Form("txtname")

Brian

"Doug Partridge" <do***************@nospam.yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Jul 19 '05 #2
Figured it out ... the tag from Test1.ASP should be:

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

in order to retrieve the posted value.

- doug
"Doug Partridge" <do***************@nospam.yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Jul 19 '05 #3

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

Similar topics

2
by: Jon Dellaria | last post by:
I have been using MySql as the database using JSP's and JavaBeans but recently I have wanted to start using the database connection pooling mechanism built into TomCat. I think I am having a...
0
by: Hans | last post by:
Hello, I have problems with retrieving some datatypes from the Navision database in SQL Server 2000. I use Linked Server with Navision ODBC driver(C/ODBC 2.60.02.5709) When retrieving...
3
by: Mark Morton | last post by:
I'm writing an if statement for a UK credit card form validation script. Users who specify that their card is Switch need to enter either the issue number or the 'valid from' date. I'm trying to...
1
by: Adam | last post by:
I am having difficulty retrieving images from a SQL database. Here is the code I use to UPLOAD the image to the database: <form id="Form1" method="post" enctype="multipart/form-data"...
7
by: Sirplaya | last post by:
I am retrieving images that I stored in SQL Server on my web pages in C#. I have no problem with the images displaying, however, I am trying to wrap the image with an <A HREF ..." and each time I...
2
by: 4Ankit | last post by:
hello all, i am having some difficulty retrieving information from my form. I want to add content in my table but the content i want to add to the table is what the user inputs in my form. ...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
3
by: scoots987 | last post by:
What do others do if you need to import excel files into SQL Server? My main problems are 1) zipcode formatting issues. If the column is a mix of zip and zip+4, I have problems retrieving all...
3
by: Tony K | last post by:
VB 2005 - Windows Vista I have a form that seems to lock up when the number of rows exceed the height of the datagridview. The following code executes when data is received through the serial...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.