Using the post method

D

Des

I have read that the way I have to read a text box from another page
has changed. I have a form using the post method I am constructing the
name of the text box using a recordset field.

<td WIDTH="60"><input type="text" name="<%=Cstr(rs("ItemID"))%>"
size="1" maxlength="2" value="<%=rs("Quantity")%>"></td>

View as text works with the name of the text box as name="Q2" 2 being
the record number

the form I am calling has the following

Dim ID as integer
Dim tmp as string
Dim Quantity as string

ID = request("item") ' Get Record number
tmp = "Q" & cstr(ID) ' Preceed with letter Q
response.write("Text Box Name = " & tmp & "<br>")

Quantity = request(tmp) ' Get value of text Box
response.write("Value = " & Quantity)

I have the imports

<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.SqlClient" %>
<%@ Import namespace="System.Web.UI" %>
<%@ Import namespace="System.Web.UI.WebControls" %>

Is there something missing in the way .NET does things
 
G

Guest

The norm in .NET is to have the page post back to itself. In ASP.NET 2.0, you
have more options, as you can pull from a previous page when posting back to
a different page (not present in 1.x).

If you are moving from classic ASP, you would be wise to retool the page to
postback to itself and make the paradigm shift.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top