Strange things are happening with RadButtons, IE9, and Visual Studio 2010.
I started a project and created a webform based on a master page. I added 4 radbuttons, 2 for users and 2 for admins.
The admin buttons are enabled=false and visible=false and will be enabled and visible if user is an admin. The user buttons are also disabled (still visible though) and the text is changed IF the user logged in is an admin.
Initial page load works as desired and if the page is refreshed it works as desired.
Now begins the bizarre behavior.
1. User loads the page and only sees the two user buttons (the admin buttons are invisible). Correct :)
2. User navigates off the page.
3. User clicks back button.
4. ALL 4 buttons are visible and all 4 buttons are in a state as if an admin is logged in. What?
5. Click refresh and all is fine.
Frustrated I started ripping my code apart to try and find where this was happening and nothing I am doing changes this behavior in the slightest. I went as far as completely removing ANY code for three of the buttons (they should not exist at all) and yet steps 2-5 above are the same every time. How can these buttons be on the page after clicking the back button on the browser when they no longer exist in my code? Where the heck are they coming from?
I started a project and created a webform based on a master page. I added 4 radbuttons, 2 for users and 2 for admins.
The admin buttons are enabled=false and visible=false and will be enabled and visible if user is an admin. The user buttons are also disabled (still visible though) and the text is changed IF the user logged in is an admin.
Initial page load works as desired and if the page is refreshed it works as desired.
Now begins the bizarre behavior.
1. User loads the page and only sees the two user buttons (the admin buttons are invisible). Correct :)
2. User navigates off the page.
3. User clicks back button.
4. ALL 4 buttons are visible and all 4 buttons are in a state as if an admin is logged in. What?
5. Click refresh and all is fine.
Frustrated I started ripping my code apart to try and find where this was happening and nothing I am doing changes this behavior in the slightest. I went as far as completely removing ANY code for three of the buttons (they should not exist at all) and yet steps 2-5 above are the same every time. How can these buttons be on the page after clicking the back button on the browser when they no longer exist in my code? Where the heck are they coming from?