Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

ASP & HTML FORMS (n00b)

Options
  • 13-12-2006 6:39pm
    #1
    Closed Accounts Posts: 521 ✭✭✭


    Hey all.

    I need to find out how to Get a label with asp and put it into a variable.

    e.g.
    <body>
    <form method="post">
    <label name="1">blah blah blah</label>
    </form>
    
    dim la
    la=Request.Form("1")
    Response.Write("label is " & la & "!<br />")
    
    </body>
    

    I had thought this would print "label is blah blah blah!" to the screen.

    It doesnt.
    (its saved in a .asp file)

    Is it possible?

    Thanks.


Comments

  • Moderators, Politics Moderators Posts: 39,818 Mod ✭✭✭✭Seth Brundle


    have you submitted the form?
    maybe read http://www.w3schools.com/asp/asp_inputforms.asp
    <body>
    <form method="post">
    [B]<!--<label name="1">blah blah blah</label>-->
    <input type="text" name="1" value="blah blah blah" />
    <input type="submit" />[/B]
    </form>
    [B]<%[/B] 'don't forget your ASP tags!!!!!
    dim la
    la=Request.Form("1")
    Response.Write("label is " & la & "!<br />")
    [B]%>[/B]
    </body>
    


Advertisement