RadioButtonList lost state

L

Lubomir

Hi,

I have a radio-button list with 2 buttons. The property for this control are
set up as follow:
AutoPostBack=true
EnableViewState=true

When I clik on 1st button, it get selected, will process the url and show
some data.
When I click the 2nd button, it get selected and data from DB will be shown.

So far, so good.

But, when I select previous URL from the Address bar in Explorer (it means I
don't hit radio-button) , than no radio button is selected - the previous
selected index is lost and not remembered in a view state.

Why is this happening?

Thanks,
Lubomir
 
N

Nathan Sokalski

Viewstate only remembers the state of a control when you do a postback. If
you go to another page using some other method (such as selecting it from
the address bar), the state is lost because you are leaving the page.
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top