Passing Values Between ASP.net pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • praneshgk
    New Member
    • Mar 2014
    • 1

    Passing Values Between ASP.net pages

    I am submitting a form to another page in asp.net using post method.In target file how to get previous page input data
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Say you have FormA and FormB.

    You can submit your page on FormA to the server side code that handles FormA, store the information into Session or cookies, and then use the Response.Redire ct Method to redirect the user to FormB. From there FormB can grab the information provided on FormA and use it for it's own purposes.

    You could also use JavaScript to change the action of the HTML Form before submitting the form...that way your FormB server-side code will get all of the information provided on FormA.

    I would recommend the first suggestion though. It is easiest and if there is anything invalid it could prevent the user from proceeding to FormB.

    -Frinny

    Comment

    Working...