This is a migrated thread and some comments may be shown as answers.

Masked Textbox ViewStateModeById Issue

1 Answer 65 Views
Input
This is a migrated thread and some comments may be shown as answers.
Serhat Gülmez
Top achievements
Rank 1
Serhat Gülmez asked on 10 Jun 2010, 06:12 PM
Hi,

Due to the nature of our application, we have to create controls dynamically, and move them from one parent to another during postbacks. This normally causes viewstate failed exceptions ("Failed to load viewstate. The control tree into which viewstate....") since control tree is modified during postbacks, however the issue is solved by using ViewStateModeById as suggested in another forum post.

This solution helped us all, except the RadMaskedTextBox control. Although we wrap it with ViewStateModeById attribute, it still causes viewstate failed exceptions when moved during postbacks. Below is how we wrapped it:

    <ViewStateModeById()>
    Public Class wrappedRadMaskedTextbox
        Inherits Telerik.Web.UI.RadMaskedTextBox
    End Class

The same method has been applied to many other controls, and they all worked fine including Telerik combobox, Telerik textbox (non mask input control) etc.

I really need help to solve this issue asap. If anyone can respond to this issue, that would be great. I also kindly ask you guys not to suggest me "disabling the viewstate" or "not dynamically creating or moving controls" since all those have valid reasons for our project. Also, regenerating the problem is fairly easy and straightforward.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 16 Jun 2010, 07:44 AM
Hello Abdurrahman,

Based on the provided information is hard to determine what is causing the described issue. Could you please send us a small runnable project which demonstrates the issue. You could open a formal support ticket from your Telerik account and attach a ZIP file there. Thus we will be able to we debug the project and provide you with more to-the-point answer.

Greetings,
Radoslav
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.
Tags
Input
Asked by
Serhat Gülmez
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or