Enable Viewstate not working in 4.4

Posted by Community Admin on 04-Aug-2018 22:21

Enable Viewstate not working in 4.4

All Replies

Posted by Community Admin on 20-Dec-2011 00:00
I added a widget containing the following code and Enabled Viewstate on the page, yet every time I press the button the label is set to LableX.

ASPX CODE
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Button ID="TestButton" runat="server" Text="Test"
    onclick="TestButton_Click" />

CODE BEHIND
        protected void TestButton_Click(object sender, EventArgs e)
       
            Label1.Text = Label1.Text + "X";
       
Posted by Community Admin on 20-Dec-2011 00:00
It's working now, however there appears to be something quirky going on. I rebooted my computer and deleted all of the temporary asp.net files and it still didn't work.

Then I tried setting enabling viewstate at the same time the page was created and then adding the widget. Not only did that work but the other page that was not working, worked after doing that.
This thread is closed