界面代码如下:
<form id="form1" runat="server">
<asp:Label ForeColor="DarkSeaGreen" ID="lel1" Text="姓名" runat="server"></asp:Label>
<asp:TextBox ID="name" runat="server"></asp:TextBox><br />
<asp:Label ForeColor="DarkSeaGreen" ID="lel2" Text="密码" runat="server"></asp:Label>
<asp:TextBox ID="pass" TextMode="Password" runat="server"></asp:TextBox><br />
<asp:Label ForeColor="DarkSeaGreen" ID="lel3" Text="对本站的建议" runat="server"></asp:Label>
<asp:TextBox ID="tb3" runat="server" TextMode="MultiLine" Text="请留下您宝贵的意见" Columns="3" MaxLength="40" Height="64px" Width="235px"></asp:TextBox><br />
<asp:Button ID="submit" Text="提交" runat="server" OnClick="submit_Click"/>
</form>
.cs代码如下
protected void Page_Load(object sender, EventArgs e)
{
if(Session["pass"]==null)
{
Response.Redirect("session.aspx");
}
}
protected void submit_Click(object sender, EventArgs e)
{
if (pass.Text =="1111")
{
Session["pass"] ="right";
Response.Redirect("request.aspx");
}
else
{
Session["pass"] = null;
}
}
生成是成功的但是在运行的时候出了问题.就象我们平时打开一个网站等待了很长时间结果却说网页无法显示
这是什么原因?高手给个答案!谢谢!