ورود

View Full Version : مشکل عجیب با vs2010



ahmad156
یک شنبه 10 دی 1391, 17:18 عصر
دوستان من یه صفحه Login ساده دارم که کدش به صورت زیر هست


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="UI.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="css/MyDefault.css" rel="stylesheet" type="text/css" />
<script src="script/jquery.js" type="text/javascript"></script>
<script src="script/MyScript.js" type="text/javascript"></script>
<style type="text/css">
html
{
background: #63bad8 url(images/loginback1.jpg) 50% 0px repeat-x;
text-align: center;
}
#logintb
{
-moz-box-shadow: 0 0 5px 5px #fff;
-webkit-box-shadow: 0 0 5px 5px#fff;
box-shadow: 0 0 5px 5px #b3daf3;
-webkit-border-radius: 20px 20px;
-moz-border-radius: 20px / 20px;
-o-border-radius: 20px / 20px;
-ms-border-radius: 20px / 20px;
-khtml-border-radius: 20px / 20px;
border-radius: 20px / 20px;
border: 6px outset #000;
border-spacing: 0px;
}
#logintb th:first-child
{
border-left: none;
-moz-border-radius-topleft: 20px;
-webkit-border-top-left-radius: 20px;
-o-border-top-left-radius: 20px;
-ms-border-top-left-radius: 20px;
-khtml-border-top-left-radius: 20px;
border-top-left-radius: 20px;
}
#logintb th:last-child
{
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-o-border-top-right-radius: 20px;
-ms-border-top-right-radius: 20px;
-khtml-border-top-right-radius: 20px;
border-top-right-radius: 20px;
}
#logintb tr td
{
border: 0px solid #333333;
border-right: none;
border-left: none;
border-bottom: none;
padding: 4px;
}
#logintb tr td:first-child
{
border-left: none;
border-left: none;
}
#logintb tr:first-child td
{
border-top: 0px;
padding: 10px;
}

</style>
<script type="text/javascript">
function Validate() {
var isValid = true;
$("#<%=txtUser.ClientID %>").css({ "background-color": "#fff" });
$("#<%=txtPass.ClientID %>").css({ "background-color": "#fff" });
if ($("#<%=txtUser.ClientID %>").val() == "" || $("#<%=txtUser.ClientID %>").val() == "UserName") {
$("#<%=txtUser.ClientID %>").css({ "background-color": "#f9c0d3" });
isValid = false;
}
if ($("#<%=txtPass.ClientID %>").val() == "" || $("#<%=txtPass.ClientID %>").val() == "PassWord") {
$("#<%=txtPass.ClientID %>").css({ "background-color": "#f9c0d3" });
isValid = false;
}
return isValid;
}
</script>
</head>
<body>
<form id="form1" runat="server">

<div>
<table id="logintb" width="350px" style="margin: 225px auto;">
<tr>
<td>
<span class="lbl" style="font-weight: bold">نام کاربری</span>
</td>
<td>
<asp:TextBox ID="txtUser" runat="server" title="UserName" CssClass="txt-large" Style="direction: ltr;
-webkit-border-radius: 10px; -moz-border-radius: 10px;"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<span class="lbl" style="font-weight: bold;">کلمه عبور</span>
</td>
<td>
<asp:TextBox ID="txtPass" runat="server" title="PassWord" CssClass="txt-large" Style="direction: ltr;
-webkit-border-radius: 10px; -moz-border-radius: 10px;" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2" class="td-left">
<asp:CheckBox ID="chkPersist" runat="server" Text="مرا به خاطر بسپار" />
</td>

</tr>
<tr>
<td colspan="2" class="td-left">
<br />
<asp:Button ID="btnLogin" runat="server" Text="ورود" CssClass="btn" OnClick="btnLogin_Click"
OnClientClick="javascript:return Validate();" Style="margin-left: 20px" />
</td>
</tr>
<tr>
<td colspan="2" class="td-right">
<div style="height: 30px">
<a href="#" style="color:Maroon">آبا کلمه عبور خود را فراموش کرده اید؟</a>
</div>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

ولی بعضی وقتها (اجرا توی محیط ویژوال استودیو) css مربوط به صفحه اعمال نمیشه و صفحه به هم ریخته رو بهم نشون میده.خطای زیر رو firebug بهم نشون میده:عصبانی:
97566