Control not maintaing viewState and PostBack not firing event.

D

Don

I created a nWeb Custom Control that inherits from WebControls.Panel
and add a CheckBoxList to this control. I can't seem to get this
control to maintain it's viewState. I don't think I need any additonal
code since I'm using existing controls. Is this correct?

In the past I've had to override LoadViewState and SaveViewState but
that is when I have a more complex control.

Also, I set AutoPostBack to true for the CheckBoxList control and now
when I make a selecttion I get a postback put it does not seem to be
firing the SelectedIndexChanged event. I put a breakpoint in the
method that handles SelectedIndexChanged for that control but I never
get to this line.

Thanks,
Don
 
M

mr fox

It sounds as though you may have a control in the page hierarchy that doesn't
have an ID set so that your control cannot be found on postback due to a
higher control that doesn't have an ID set being given a different ID on
postback than before.

Regards,

mr fox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top