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. The viewstate is invalid for this page and might be corrupted..............?How to resolve

The viewstate is invalid for this page and might be corrupted..............?How to resolve

Scheduled Pinned Locked Moved ASP.NET
helpdatabasecsharpjavascript
3 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.
  • B Offline
    B Offline
    BalasahebK
    wrote on last edited by
    #1

    Can someone help me to sort out this error. I will explain how did I get this error.... On my aspx page, i placed two buttons one is runat=server and other is HTMLBUTTON without runat=server. On server ctrl button, I have implemented some code.... working fine. On HTML Btn, I have written client side javascript.... it is also working fine. HTML btn clears all the textboxes on client side page. Now problem, I have faced is whenever I click on html btn it works and after this click event when I click on Server Btn, it gives me this error. Reason might be: - Viewstate of all controls get cleared after click on HTML btn, so whenever user clicks on server button, it could not find out its own viewstate information. This might be the reason, can someone help me.............

    Balasaheb Software Developer Platform: Asp.net,vb.net Database: SQL Server 2000

    _ 1 Reply Last reply
    0
    • B BalasahebK

      Can someone help me to sort out this error. I will explain how did I get this error.... On my aspx page, i placed two buttons one is runat=server and other is HTMLBUTTON without runat=server. On server ctrl button, I have implemented some code.... working fine. On HTML Btn, I have written client side javascript.... it is also working fine. HTML btn clears all the textboxes on client side page. Now problem, I have faced is whenever I click on html btn it works and after this click event when I click on Server Btn, it gives me this error. Reason might be: - Viewstate of all controls get cleared after click on HTML btn, so whenever user clicks on server button, it could not find out its own viewstate information. This might be the reason, can someone help me.............

      Balasaheb Software Developer Platform: Asp.net,vb.net Database: SQL Server 2000

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      I don't find any problem in that. I check by putting one html button and one server side button control and they are working fine for me. Your problem seems to be some where else.

      Best Regards, Apurva Kaushal

      B 1 Reply Last reply
      0
      • _ _AK_

        I don't find any problem in that. I check by putting one html button and one server side button control and they are working fine for me. Your problem seems to be some where else.

        Best Regards, Apurva Kaushal

        B Offline
        B Offline
        BalasahebK
        wrote on last edited by
        #3

        ok I will explain in detail.... The code on html btn click is (on click = "clearFields('frmMain')") /* The elements to be cleared can be passed as either: a) a set of arguments, each is a String containing an element name or b) a String containing all element names separated by single space. You can also use a combination, that is, a set of arguements, each being a String as described in b). This option may seem redundant, but may help readability of the code. */ function clearFields(form_) { var args = clearFields.arguments; if(args.length > 1) { for(var i=1; i 0 ) { for(var ii=0; iiBalasaheb Software Developer Platform: Asp.net,vb.net Database: SQL Server 2000

        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