主题:一段无法运行的ASP。NET代码,请赐教啊,谢谢了
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load()
{
If(Page.IsPostBack)
}
lblAddress.Text="";
lblPassword.Text="";
{
if(txtName.Text !="")
lblName.Text="You have entered the following name:"+txtName.Text;
if(txtAddress.Text !="")
lblAddress.Text !="You have entered the following address:"+txtAddress.Text;
if(txtPassword.Text !="")
lblPassword.Text="You have entered the following password:"+txtPasswod.Text;
}
</script>
<html>
<head>
<title>Text Box Example</title>
</head>
<body>
<asp:Label id="lblName" runat="server"></asp:Label>
<br />
<asp:Label id="lblAddress" runat="server"></asp:Label>
<br />
<asp:Label id="lblPassword" runat="server"></asp:Label>
<br />
<form runat="server">
Please enter your name:
<asp:textbox id="txtName" runat="server"></asp:textbox>
<br />
<br />
Please enter your address:
<asp:textbox id="txtAddress" runat="server" textmode="multiline" rows="5"></asp:textbox>
<br />
<br />
Please enter your chosen password:
<asp:textbox id="txtPassword" textmode="password" runat="server"></asp:textbox>
<br />
<br />
<input type="submit" value="提交查询内容" />
</form>
</body>
</html>
<script runat="server">
void Page_Load()
{
If(Page.IsPostBack)
}
lblAddress.Text="";
lblPassword.Text="";
{
if(txtName.Text !="")
lblName.Text="You have entered the following name:"+txtName.Text;
if(txtAddress.Text !="")
lblAddress.Text !="You have entered the following address:"+txtAddress.Text;
if(txtPassword.Text !="")
lblPassword.Text="You have entered the following password:"+txtPasswod.Text;
}
</script>
<html>
<head>
<title>Text Box Example</title>
</head>
<body>
<asp:Label id="lblName" runat="server"></asp:Label>
<br />
<asp:Label id="lblAddress" runat="server"></asp:Label>
<br />
<asp:Label id="lblPassword" runat="server"></asp:Label>
<br />
<form runat="server">
Please enter your name:
<asp:textbox id="txtName" runat="server"></asp:textbox>
<br />
<br />
Please enter your address:
<asp:textbox id="txtAddress" runat="server" textmode="multiline" rows="5"></asp:textbox>
<br />
<br />
Please enter your chosen password:
<asp:textbox id="txtPassword" textmode="password" runat="server"></asp:textbox>
<br />
<br />
<input type="submit" value="提交查询内容" />
</form>
</body>
</html>