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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Getting the error : The viewstate is invalid for this page and might be corrupted

Getting the error : The viewstate is invalid for this page and might be corrupted

Scheduled Pinned Locked Moved ASP.NET
javascripthtmlhelpquestion
5 Posts 2 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.
  • A Offline
    A Offline
    anufabian
    wrote on last edited by
    #1

    The code below in the HTML is throwing me the above error : WebForm3 function fire() { document.Form1.action = "WebForm4.aspx"; document.Form1.submit(); }

    I am firing the javascript using but1.Attributes.Add("OnClick", "fire();") I want the hidden variable on WebForm4.aspx. How can I get the same

    H 1 Reply Last reply
    0
    • A anufabian

      The code below in the HTML is throwing me the above error : WebForm3 function fire() { document.Form1.action = "WebForm4.aspx"; document.Form1.submit(); }

      I am firing the javascript using but1.Attributes.Add("OnClick", "fire();") I want the hidden variable on WebForm4.aspx. How can I get the same

      H Offline
      H Offline
      Harini N K
      wrote on last edited by
      #2

      Hi Use Server.Transfer to redirect to a new page. Remove Javascript function Request.Form["id"] to get value from previous form that is posted to new page.

      Rate this message. Thank you. Harini :)

      A 1 Reply Last reply
      0
      • H Harini N K

        Hi Use Server.Transfer to redirect to a new page. Remove Javascript function Request.Form["id"] to get value from previous form that is posted to new page.

        Rate this message. Thank you. Harini :)

        A Offline
        A Offline
        anufabian
        wrote on last edited by
        #3

        I want to do as it is without any changes as this is the requirement. I do not want to do nay thing in the code behind file.

        H A 2 Replies Last reply
        0
        • A anufabian

          I want to do as it is without any changes as this is the requirement. I do not want to do nay thing in the code behind file.

          H Offline
          H Offline
          Harini N K
          wrote on last edited by
          #4

          Hi I found one solution for that. Set

          EnableViewStateMac="false"

          at the Page attribute in the WebForm4.aspx file. :)

          Rate this message. Thank you. Harini :)

          1 Reply Last reply
          0
          • A anufabian

            I want to do as it is without any changes as this is the requirement. I do not want to do nay thing in the code behind file.

            A Offline
            A Offline
            anufabian
            wrote on last edited by
            #5

            Thanks harini ur idea worked, Now i want to do something in a work around way. I have an aspx page , on which i have removed the complete parts. on this page I am printing a value from the Session , which contains a form by itself. Now I want to change the action of this form and also submit this form so that I can get the hidden variables of this form on another normal aspx page. could u suggest how to go about with this problem

            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