我正在使用Visual Studio 2008制作WAP网站。
在默认页面default.aspx中,我有这个控件:
<mobile:Command ID="com" BreakAfter="True" Runat="server" Click="com_Click">Login</mobile:Command>
default.aspx.cs
protected void com_Click(object sender, EventArgs e)
{
Response.Redirect("Login.aspx");
}
单击按钮时,地址栏显示“http:// loaclhost:1564 / #_ pbc1”。 它不起作用,但在Opera中是正常的。我不知道为什么 我还需要做点什么吗?
答案 0 :(得分:0)
这是一个锚标记...它可能是由你正在使用的javascript库引起的。通常,因为a
标记需要href
项,因此使用#
因为它不会重新加载页面。
首先尝试:Response.Redirect("~/Login.aspx");
先看看它是否有帮助。
希望有所帮助。