Using POST method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sandeepk84
    New Member
    • Oct 2006
    • 97

    Using POST method

    hi all...
    am trying to send data from one web page to another using post method..
    the code is in C#.it's given in the click event of a command button.
    like destinationfile name.aspx?param eters
    how these parameters are to b handled in the destination page?
    please help...
  • LacrosseB0ss
    New Member
    • Oct 2006
    • 112

    #2
    there's a few ways. You could use GET or Request Query String. My personal preference is the latter and the syntax is close to the same. Syntax is as follows:

    Code:
    Dim strGetVar As String
    
    strGetVar = Request.QueryString("varname")
    where varname is whatever you named the variable you are passing from the previous form.

    Hope it helps, best of luck
    LB
    Last edited by LacrosseB0ss; Oct 27 '06, 07:00 PM. Reason: spelling mistake in code

    Comment

    • sandeepk84
      New Member
      • Oct 2006
      • 97

      #3
      THANKS BOSS...
      i got it when used
      Request.QuerySt ring["value"].ToString();

      and Request["value"].ToString() was also working...

      i made a mistake earlier..there were some blank spaces
      in the variable passed...
      means when it is "destinationpag e.aspx?value=ms gfromthefirstpa ge" it's getting..
      but when it's second.aspx?val ue=msg from the first page" it's not...
      can u tell me y it's like that?
      Thanks a lot...

      Comment

      Working...