Using the post method

  • Thread starter Thread starter Des
  • Start date Start date
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
 
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!
***************************
 
Back
Top