Radio buttons change state when page changes

  • Thread starter Thread starter _Who
  • Start date Start date
W

_Who

I have a master containing radio buttons all with the same group name.

If I select one of the buttons and then navigate to a different page the
buttons revert to their initial state.

Is that what you'd expect?

How can I make the state persist?



Thanks
 
Yes, that is expected. Think of master pages as user controls embedded in
content pages. A different page has no knowledge about the previous one
unless you cater for that. You may want to save the selection in a session
variable and restore it on the next page in Page_Load event.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
thanks

Mark Rae said:
I have a master [page] containing radio buttons all with the same group
name.

If I select one of the buttons and then navigate to a different page the
buttons revert to their initial state.

Is that what you'd expect?

Yes, just like with any other UserControl, which is all a MasterPage is...
How can I make the state persist?

Store them in a Session variable.
 
thanks

Eliyahu Goldin said:
Yes, that is expected. Think of master pages as user controls embedded in
content pages. A different page has no knowledge about the previous one
unless you cater for that. You may want to save the selection in a session
variable and restore it on the next page in Page_Load event.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


_Who said:
I have a master containing radio buttons all with the same group name.

If I select one of the buttons and then navigate to a different page the
buttons revert to their initial state.

Is that what you'd expect?

How can I make the state persist?



Thanks
 
Back
Top