Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Redirecting to another page

Redirecting to another page

Scheduled Pinned Locked Moved ASP.NET
helpquestioncomsysadmindebugging
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pmartike
    wrote on last edited by
    #1

    Hi! I have a question. How can i redirect to another page in a Button_click event. If i try with Response.Redirect("test.aspx") on test.aspx i get null values Request.Form("...") . If i try with Server.Transfer("...") i get an error: "Sys.Webforms.PageRequestManagerParserErrorException:The message recieved from the server could not be parsed. Common causes for this error are when the response is modified by calls Response.Write(),response filters,HttpModules,or server trace is enabled. Details error parsing near ' y code: protected void OkBTN_Click(object sender, ImageClickEventArgs e) { if (startDate <= endDate) Server.Transfer("test.aspx"); else { messageLbl.Text = dateError; messageLbl.Visible = true; } } I just want to redirect to my test.aspx page and get some values with Request.Form(). Plese help me :) Thank you! Regards, Marta Paniti.

    -------------------------------- visit: http://pmartike.deviantart.com/

    E N 2 Replies Last reply
    0
    • P pmartike

      Hi! I have a question. How can i redirect to another page in a Button_click event. If i try with Response.Redirect("test.aspx") on test.aspx i get null values Request.Form("...") . If i try with Server.Transfer("...") i get an error: "Sys.Webforms.PageRequestManagerParserErrorException:The message recieved from the server could not be parsed. Common causes for this error are when the response is modified by calls Response.Write(),response filters,HttpModules,or server trace is enabled. Details error parsing near ' y code: protected void OkBTN_Click(object sender, ImageClickEventArgs e) { if (startDate <= endDate) Server.Transfer("test.aspx"); else { messageLbl.Text = dateError; messageLbl.Visible = true; } } I just want to redirect to my test.aspx page and get some values with Request.Form(). Plese help me :) Thank you! Regards, Marta Paniti.

      -------------------------------- visit: http://pmartike.deviantart.com/

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #2

      try Response.redirect(url?variables)

      P 1 Reply Last reply
      0
      • E eyeseetee

        try Response.redirect(url?variables)

        P Offline
        P Offline
        pmartike
        wrote on last edited by
        #3

        I'm sorry but i have a lot of controls on my first page... i can't transfer all those values like this :(

        -------------------------------- visit: http://pmartike.deviantart.com/

        1 Reply Last reply
        0
        • P pmartike

          Hi! I have a question. How can i redirect to another page in a Button_click event. If i try with Response.Redirect("test.aspx") on test.aspx i get null values Request.Form("...") . If i try with Server.Transfer("...") i get an error: "Sys.Webforms.PageRequestManagerParserErrorException:The message recieved from the server could not be parsed. Common causes for this error are when the response is modified by calls Response.Write(),response filters,HttpModules,or server trace is enabled. Details error parsing near ' y code: protected void OkBTN_Click(object sender, ImageClickEventArgs e) { if (startDate <= endDate) Server.Transfer("test.aspx"); else { messageLbl.Text = dateError; messageLbl.Visible = true; } } I just want to redirect to my test.aspx page and get some values with Request.Form(). Plese help me :) Thank you! Regards, Marta Paniti.

          -------------------------------- visit: http://pmartike.deviantart.com/

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Server.Transfer("test.aspx", true); true to preserve the QueryString and Form collections; false to clear the QueryString and Form collections.


          only two letters away from being an asset

          P 1 Reply Last reply
          0
          • N Not Active

            Server.Transfer("test.aspx", true); true to preserve the QueryString and Form collections; false to clear the QueryString and Form collections.


            only two letters away from being an asset

            P Offline
            P Offline
            pmartike
            wrote on last edited by
            #5

            but Server.Transfer() not working with true or without true... I got an error when i use Server.Transfer()

            -------------------------------- visit: http://pmartike.deviantart.com/

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups