Posted Form Items not in Request

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

    Posted Form Items not in Request

    Hi there,
    I have a pure HTML form that is submitting data back to an
    ..ASPX form. However, when I try to read the field values from the Request
    object, the values are not there.

    The Form has id, method and action set. The fields have ids, but when I do
    something like:

    String avar = Request["FieldId"];

    I only ever get null returned. What am I missing?

    Regards,

    Steve W.


  • George Ter-Saakov

    #2
    Re: Posted Form Items not in Request

    If you are not using .NET controls then you need to use name not id....

    Like <input type="text" name="txtUser">
    then Request["txtUser"] will work

    Also they must be inside of <form</formtags.

    PS: You can always check in debugger Request.Forms collection to see what is
    being submitted.

    George.


    "Waldy" <someone@micros oft.comwrote in message
    news:%23$wRzHWm IHA.3780@TK2MSF TNGP06.phx.gbl. ..
    Hi there,
    I have a pure HTML form that is submitting data back to an
    .ASPX form. However, when I try to read the field values from the Request
    object, the values are not there.
    >
    The Form has id, method and action set. The fields have ids, but when I
    do something like:
    >
    String avar = Request["FieldId"];
    >
    I only ever get null returned. What am I missing?
    >
    Regards,
    >
    Steve W.
    >

    Comment

    • Waldy

      #3
      Re: Posted Form Items not in Request

      "George Ter-Saakov" <gt-nsp@cardone.com wrote in message
      news:OalrbGXmIH A.5280@TK2MSFTN GP02.phx.gbl...
      If you are not using .NET controls then you need to use name not id....
      >
      Like <input type="text" name="txtUser">
      then Request["txtUser"] will work
      >
      Also they must be inside of <form</formtags.
      Thanks George, that was it.


      Comment

      Working...