为什么进行跳转的时候,点登陆,还在原地,
地址栏由原先:http://localhost/notepad/Login.aspx
确变成这样:
http://localhost/notepad/Login.aspx?ReturnUrl=%2fnotepad%2fwebform1.aspx
地址栏由原先:http://localhost/notepad/Login.aspx
确变成这样:
http://localhost/notepad/Login.aspx?ReturnUrl=%2fnotepad%2fwebform1.aspx
Response.Redirect(yourURL);
为什么进行跳转的时候,点登陆,还在原地,
地址栏由原先:http://localhost/notepad/Login.aspx
确变成这样:
http://localhost/notepad/Login.aspx?ReturnUrl=%2fnotepad%2fwebform1.aspx
sql = "select login_level from t_sys_login where login_userid='" & user.Text & "' and login_password='" & pass.Text & "'"
Try
Dim dlyh As SqlDataReader
Dim comm As New SqlCommand(sql, conn)
conn.Open()
dlyh = comm.ExecuteReader
If dlyh.Read Then
'Session("login_level") = dlyh("login_level")
' FormsAuthentication.RedirectFromLoginPage(pass.Text)
Response.Redirect("webform1.aspx")
dlyh.Close()
comm.Dispose()
Return
Else
dlyh.Close()
comm.Dispose()
Response.Write("<script language=jscript>alert('工号或密码输入不正确,请重新输入')</script>")
End If
Catch ex As Exception
Response.Write("<script language=jscript>alert('数据连接失败,请重试')</script>")
Exit Sub
Finally
If Not (conn Is Nothing) Then
conn.Close() End If End Try
{
this.Response.Redirect("WebForm2.aspx");
}
else
{
this.Response.Redirect("WebForm3.aspx");
}
我写了个测试,可以跳转