I have weird problem and don't know how to solve it.
I have webpage that basically on server side does something like this in Page_Load event:
if (Page.User.IsInRole("Admin"))
{
ButtonEdit.Visible = true;
}
Basically, if user is an Admin, I will show Edit button (which is otherwise hidden). This concept works everywhere within web application except on one single page. I've put some code breaks and realized that on this page Page.User.IsInRole("Admin") always returns false.
For things to be more confusing, everything works fine in Firefox. Code on problematic page performs as expected.
So, to sumarize, user, an admin, that is experiencing this problem (only one so far) sees following:
- Test1 webserver: Edit button shows in IE and Firefox
- Test2 webserver: Edit button shows in IE and Firefox
- Production webserver: No Edit Button in IE, but there is Edit button in Firefox
The only thing I noticed is that CSS sometime breaks on the same page (not too often, sort of hard to recreate), then html elements look like no css styles were applied. I suspect that there is missing closing tag or quote or something which causes IE to crash. But not sure how to locate culprit. There are no javascript or any other errors on the page. The page code is pretty big and going line by line is option I am trying to avoid.
Is there a way to validate HTML in Visual Studio 2010, and somehow make sure that all tags are properly written?
Thanks for any suggestion.
Thanks