I explain my issue, in a webform I can add entries to viewstate without problems through my userControl, sample:
But, if this entry is a dbcontext not attached entity, RadAjaxPanel seems to be affected. Sample code adding entity:
After adding 'item' to viewstate RadAjaxPanel don't respond, for example making visible or changing values to RadTextBox or other controls.
I have make a lot of tests, I can store into ViewState all kind of objects, for example, I have tested with new String() { "a", "b" } and all runs perfectly but storing detached entity.
Somebody know what this happens? Also, somebody has a workaround to store dbcontext simple entity through posts?
Regards
Public Property ItemId As Integer? Get Return Me.ViewState("Id") End Get Set(value As Integer?) Me.ViewState.Add("Id", value) End SetEnd PropertyBut, if this entry is a dbcontext not attached entity, RadAjaxPanel seems to be affected. Sample code adding entity:
Public Property ItemId As Integer? Get Return Me.ViewState("Id") End Get Set(value As Integer?) Me.ViewState.Add("Id", value) Dim ctx = MyEntityContext ctx.Configuration.ProxyCreationEnabled = False Dim item = ctx.SomeCollection.find( value ) Me.ViewState.Add("item", item) End SetEnd PropertyAfter adding 'item' to viewstate RadAjaxPanel don't respond, for example making visible or changing values to RadTextBox or other controls.
I have make a lot of tests, I can store into ViewState all kind of objects, for example, I have tested with new String() { "a", "b" } and all runs perfectly but storing detached entity.
Somebody know what this happens? Also, somebody has a workaround to store dbcontext simple entity through posts?
Regards