Radio buttons change state when page changes

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
 
E

Eliyahu Goldin

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
 
W

_Who

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.
 
W

_Who

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
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top