.net - Serialization issue when using StateServer mode in asp.net -


if session mode set "stateserver", serialization error because i'm storing list of controls in session, , adding aspx placeholder control. here's code think problematic:

protected sub addctrl(byval ctrl control)    dim l list(of control)    if session("ctrls") nothing       l = new list(of control)    else       l = directcast(session("ctrls", list(of control))    end if end sub 

later on in code, iterate through ctrls session object, , add each control placeholder in html.

what can fix problem? tried create custom list inherits list, , made serializable , use custom list instead, didn't it:

<serializable()> _ public class mylist      inherits list(of control) 

i tried using viewstate instead , didn't it. seeking advice...

thanks!


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -