hi,
Here I encounter a strange problem. When login fail (password is not right), the page will display some strange characters.
The "<style " and "<script " will all become "?tj le" and "0?4 cript". And then the page cannot run properly.
The Login page is a master page using the Login control to validate the user. And this strange scenario is happend from time to time (very easy to happen, but not every time and every browser will happen)
The web server is Server 2003, client is XP and IE 7.0
Has anybody know how to resolve it?
check if you are writing anything using Response.Write .. or changing the Response.contentType.
Also check that if your Page-HTML is proper. Just open HTML view of page ..and PressCTRL K + CTRL D.if your HTML is OK then VS.NET will align your code properly. if HTML has problem then VS.NET will keep multiple tags on the same line.
also check the contentType and HTML namespace is proper.
I haven't use Response.Write in code. The HTML is also ok, not found any invalid element.
About the ContentType, I haven't used it. And about the HTML namespace, is that mean the following:
<html xmlns="http://www.w3.org/1999/xhtml">
BTW, I deleted the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> in this Master page. Because this declare will influence the page height, I cannot let page's height be 100% after using it.
I have tried add the "<!DOCTYPE ...>", but takes no effect.
I have tried Firefox, it's ok. Just IE will happen.
Below are the part of the generated script in IE
<style type="text/css">
#AutoScrollContent
{
position:absolute;
top:250;
left:0;
width:544;
z-index: 3;
visibility: visible;
}
</style>
`= le type="text/css">
.ctl00_MenuLink_0 { background-color:white;visibility:hidden;display:none;position:absolute;left:0px;top:0px; }
.ctl00_MenuLink_1 { text-decoration:none; }
.ctl00_MenuLink_2 { }
.ctl00_MenuLink_3 { color:#003399;font-size:10pt;font-weight:bold;border-style:none; }
.ctl00_MenuLink_4 { background-color:#84BBF3; }
.ctl00_MenuLink_5 { }
.ctl00_MenuLink_6 { border-style:none; }
.ctl00_MenuLink_7 { }
</style></head>
0 comments:
Post a Comment