This line is lame!

Discussion in 'C#' started by Sleeping Troll, Jul 7, 2008.

  1. #1
    This line doesn't work, no big surprise, but I really need to pass the ProdID along with the input text in the form, Anyone know how it can be done?

    <form name="Item" action="EditItem.asp?ProdID=80515" method="Post">
    Code (markup):
     
    Sleeping Troll, Jul 7, 2008 IP
  2. helpbeam

    helpbeam Guest

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    How about this?

    <form name="Item" action="EditItem.asp" method="Post">
       <input type=hidden name=ProdID  value=80515>
    </form>
    Code (markup):
     
    helpbeam, Jul 7, 2008 IP
  3. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #3
    You're trying to a pass a GET querystring with a method of POST. helpbeam's solution is what you want to do.
     
    itcn, Jul 9, 2008 IP
  4. salman4raza

    salman4raza Peon

    Messages:
    373
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    just set method = get and its will work. or make a hidden input with the same name. as above.

    when ever working with forms, try to avoid using ? in action
     
    salman4raza, Jul 21, 2008 IP