Forms Doubt

Discussion in 'ASP General' started by Renjith, Jun 22, 2005.

  1. Renjith

    Renjith Guest

    Hi

    how to set data to html from textbox from an asp page

    renjith
    Renjith, Jun 22, 2005
    #1
    1. Advertising

  2. Renjith

    Phill. W Guest

    "Renjith" <> wrote in message
    news:...
    > Hi
    >
    > how to set data to html from textbox from an asp page
    >
    > renjith


    Something like this ?

    [me.asp]
    <html>
    <body>
    <form name='frmMain' action='./me.asp' method='post'>
    <%
    Dim sOne : sOne = Request.Form( "txtOne" )

    If sOne <> "" Then
    Response.Write "<p>Value is <b>" _
    & Server.HTMLEncode( sOne ) _
    & "</b></p>"
    End If

    Response.Write "<p><input " _
    & "type='input' " _
    & "name='txtOne' " _
    & "value='" & sOne & "' " _
    & "size='20' " _
    & "></p>"
    Response.Write "<p><input " _
    & "type='submit' " _
    & "name='submit' " _
    & "></p>"
    %>
    </form>
    </body>
    </html>

    HTH,
    Phill W.
    Phill. W, Jun 22, 2005
    #2
    1. Advertising

  3. Renjith

    Renjith Guest

    Hi Phill

    Sorry , the question i gave was wrong....

    "how to set data to html form textbox from an asp page"

    Like after validation of the form i have to show "Invalid User" in the HTML
    file , from the asp file , where validation is done.

    Renjith

    "Phill. W" wrote:

    > "Renjith" <> wrote in message
    > news:...
    > > Hi
    > >
    > > how to set data to html from textbox from an asp page
    > >
    > > renjith

    >
    > Something like this ?
    >
    > [me.asp]
    > <html>
    > <body>
    > <form name='frmMain' action='./me.asp' method='post'>
    > <%
    > Dim sOne : sOne = Request.Form( "txtOne" )
    >
    > If sOne <> "" Then
    > Response.Write "<p>Value is <b>" _
    > & Server.HTMLEncode( sOne ) _
    > & "</b></p>"
    > End If
    >
    > Response.Write "<p><input " _
    > & "type='input' " _
    > & "name='txtOne' " _
    > & "value='" & sOne & "' " _
    > & "size='20' " _
    > & "></p>"
    > Response.Write "<p><input " _
    > & "type='submit' " _
    > & "name='submit' " _
    > & "></p>"
    > %>
    > </form>
    > </body>
    > </html>
    >
    > HTH,
    > Phill W.
    >
    >
    >
    Renjith, Jun 22, 2005
    #3
  4. Renjith

    Phill. W Guest

    Renjith,

    It's not all /that/ different.
    Here's my code revised to allow just "Yes", "No" and "Maybe"
    in the textbox ...

    [me.asp]
    <html>
    <body>
    <form name='frmMain' action='./me.asp' method='post'>
    <%
    Dim sOne : sOne = Request.Form( "txtOne" )

    Response.Write "<p><input " _
    & "type='input' " _
    & "name='txtOne' " _
    & "value='" & sOne & "' " _
    & "size='20' " _
    & "> "
    Select Case UCase( sOne )
    Case "YES", "NO", "MAYBE"
    Case Else
    Response.Write "INVALID - must be Yes, No or Maybe"
    End Select
    Response.Write "</p>"

    Response.Write "<p><input " _
    & "type='submit' " _
    & "name='submit' " _
    & "></p>"
    %>
    </form>
    </body>
    </html>

    "Renjith" <> wrote in message
    news:...
    > Hi Phill
    >
    > Sorry , the question i gave was wrong....
    >
    > "how to set data to html form textbox from an asp page"
    >
    > Like after validation of the form i have to show "Invalid User" in the

    HTML
    > file , from the asp file , where validation is done.
    >
    > Renjith
    >
    > "Phill. W" wrote:
    >
    > > "Renjith" <> wrote in message
    > > news:...
    > > > Hi
    > > >
    > > > how to set data to html from textbox from an asp page
    > > >
    > > > renjith

    > >
    > > Something like this ?
    > >
    > > [me.asp]
    > > <html>
    > > <body>
    > > <form name='frmMain' action='./me.asp' method='post'>
    > > <%
    > > Dim sOne : sOne = Request.Form( "txtOne" )
    > >
    > > If sOne <> "" Then
    > > Response.Write "<p>Value is <b>" _
    > > & Server.HTMLEncode( sOne ) _
    > > & "</b></p>"
    > > End If
    > >
    > > Response.Write "<p><input " _
    > > & "type='input' " _
    > > & "name='txtOne' " _
    > > & "value='" & sOne & "' " _
    > > & "size='20' " _
    > > & "></p>"
    > > Response.Write "<p><input " _
    > > & "type='submit' " _
    > > & "name='submit' " _
    > > & "></p>"
    > > %>
    > > </form>
    > > </body>
    > > </html>
    > >
    > > HTH,
    > > Phill W.
    > >
    > >
    > >
    Phill. W, Jun 22, 2005
    #4
  5. Renjith

    Ken Jenkins Guest

    Ken Jenkins, Jun 22, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob Nelson

    doubt about doubt

    Bob Nelson, Jul 28, 2006, in forum: C Programming
    Replies:
    11
    Views:
    624
  2. Eric
    Replies:
    2
    Views:
    504
  3. Replies:
    0
    Views:
    560
  4. Peter Otten
    Replies:
    2
    Views:
    112
    Cousin Stanley
    Aug 10, 2013
  5. Terry Reedy
    Replies:
    0
    Views:
    115
    Terry Reedy
    Aug 10, 2013
Loading...

Share This Page