//try:
//前台:
<body>
<form id="form1" runat="server">
<div>
<input id="Button2" type="button" value="button" onclick="wsp()">
</div>
</form>
</body>
</html>
<script>
function wsp()
{
var message="<%=temp("admin","1000")%>";
if(message=="true")
{
window.open("user.aspx","_self");
}
else
{
alert("密码错误");
}
}
</script>
//cs文件:
public string temp(string a, string b)
{
if (a == "admin" && b == "1000")
return "true";
else
return "false";
}