More in this section
Forums / Bugs & Issues / Enable Viewstate not working in 4.4

Enable Viewstate not working in 4.4

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. David
    David avatar
    99 posts
    Registered:
    06 Sep 2012
    20 Dec 2011
    Link to this post
    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";
            }
  2. David
    David avatar
    99 posts
    Registered:
    06 Sep 2012
    20 Dec 2011
    Link to this post
    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.
2 posts, 0 answered