Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HELP: Inherited User Control Loses ViewState

Thread Tools

HELP: Inherited User Control Loses ViewState

Spam Catcher
Posts: n/a
Hi all,

I have a CustomUserControl class which inherits from UserControl.

I have ASCX which inherits from CustomUserControl (instead of UserControl).

Child controls on CustomUserControl lose their viewstate! But when I switch
the 'inherit' line back to UserControl, viewstate works as expected.

My CustomUserControl class is merely a shell at the moment.

So why does Viewstate break when I extend UserControl? I've saw a couple
messages on Google Groups but there doesn't seem to be any resolution.

Any know of a way to extend UserControl?

Stan Kee ((E-Mail Removed))

Boycott StarForce!
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
UpdatePanel control loses ViewState data if Visible property setOptions Dwight Johnson ASP .Net 0 10-07-2008 06:24 PM
Control loses viewstate inside HeaderTemplate of DataList Fahim ASP .Net 0 08-18-2006 12:17 PM
Serialized class in web user control loses viewstate on postback ASP .Net 0 04-07-2006 01:09 AM
Disabled Panel control loses viewstate Robert Phillips ASP .Net Web Controls 3 04-28-2004 06:52 PM
Dropdownlist in Server Control loses Viewstate Graham Stevenson ASP .Net Building Controls 2 12-03-2003 09:16 AM