More in this section

Forums / General Discussions / Still cannot viewstate to work properly

Still cannot viewstate to work properly

3 posts, 0 answered
  1. Philip Senechal
    Philip Senechal avatar
    69 posts
    07 Apr 2008
    19 Jan 2011
    Link to this post
    I still can't seem to get the viewstate working properly. I removed the script that I had added originally from another user's post that added the following to my Master page which I'm using as a template

    <script type="text/C#" runat="server">
        protected override void OnInit(EventArgs e)
            this.Page.EnableViewState = true;

    I was able to get the viewstate to retain my values so that when my grid updated via ajax, the new values would appear.

    This morning I upgraded my RC2 project to the final 4.0 release. I removed the script above and enabled the viewstate on the page using the admin panel and checking the box. I cannot get the grids to refresh with my new values and now even setting the configuration back to the way I had it with the script above doesn't work. So now I've completely lost viewstate.

    I'm implementing ajax per a previous post solution where I'm adding a RadScriptManager to my Master page and then overriding the Init function to programmatically add a RadAjaxManager. My pages then in turn use a RadAjaxManagerProxy.

    If there is a different way to do this so that I can have ajax on my custom controls AND maintain the viewstate, please let me know how to do it. Thanks.
  2. Eric
    Eric avatar
    147 posts
    12 Nov 2007
    19 Jan 2011
    Link to this post
    Viewstate works for me, as long as I don't put controls in a layout control (e.g. 75%, 25% columns). I've yet to come up with a solution that works in conjunction with layout controls.
  3. Pavel Iliev
    Pavel Iliev avatar
    140 posts
    18 Jul 2016
    21 Jan 2011
    Link to this post
    Hi Philip,

    We've reproduced the issue at was logged as a bug (#105496). We'll try to fix it for SP1. I am sorry for the inconvenience that this might have caused you.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 0 answered