Saturday, March 24, 2012

Invalid viewstate

I'm having no fun trying to figure out why I keep getting an invalid viewstate when I do a page refresh for this code:
<%@dotnet.itags.org. Page Language="VB" AutoEventWireup="false" Title="Test"%><script runat="server"> Protected Sub Test_OnCommand(ByVal sender As Object, ByVal Args As CommandEventArgs) Test.Visible = False End Sub </script><form runat="server" id="hello"><asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager> <asp:UpdatePanel id="UpdatePanel1" runat="server" updatemode="Conditional" visible="true"> <ContentTemplate> <asp:Button id="Test" text="Generate" runat="server" enableviewstate="true" width="100" oncommand="Test_OnCommand"></asp:Button> </ContentTemplate> </asp:UpdatePanel></form>
Your help would be greatly appreciated :-)

The code runs just fine on my PC.


The code works fine on my computer. Have you updated your version of Visual Studio with Service Pack 1. It was suppose to provide better support for Ajax. Maybe thats the problem, i can't be sure.

No comments:

Post a Comment