Using the post method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Des

    Using the post method

    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"><inp ut type="text" name="<%=Cstr(r s("ItemID"))% >"
    size="1" maxlength="2" value="<%=rs("Q uantity")%>"></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="Syst em.Data" %>
    <%@ Import namespace="Syst em.Data.SqlClie nt" %>
    <%@ Import namespace="Syst em.Web.UI" %>
    <%@ Import namespace="Syst em.Web.UI.WebCo ntrols" %>

    Is there something missing in the way .NET does things

  • Cowboy (Gregory A. Beamer) - MVP

    #2
    RE: Using the post method

    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!
    *************** ************


    "Des" wrote:
    [color=blue]
    > 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"><inp ut type="text" name="<%=Cstr(r s("ItemID"))% >"
    > size="1" maxlength="2" value="<%=rs("Q uantity")%>"></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="Syst em.Data" %>
    > <%@ Import namespace="Syst em.Data.SqlClie nt" %>
    > <%@ Import namespace="Syst em.Web.UI" %>
    > <%@ Import namespace="Syst em.Web.UI.WebCo ntrols" %>
    >
    > Is there something missing in the way .NET does things
    >
    >[/color]

    Comment

    Working...