专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > VB Dotnet

:aspnet MemberShip跳转页面的有关问题

发布时间:2011-06-23 14:45:59 文章来源:www.iduyao.cn 采编人员:星星草
在线等:aspnet MemberShip跳转页面的问题
XML code

<authentication mode="Forms">
    <forms loginUrl="~/Login.aspx" timeout="2880" defaultUrl="~/Index.aspx"/>
</authentication>


已经在config文件中配置了Form验证。默认的URL是Index.aspx,当登录成功后会跳转到Index.aspx
但我想要的想过是:Login成功后,跳转到它之前访问的页面。

VB.NET code

Protected Sub LoginButton_Click(ByVal sender As Object, ByVal e As EventArgs)

        If Membership.ValidateUser(LoginUser.UserName, LoginUser.Password) Then
            FormsAuthentication.RedirectFromLoginPage(LoginUser.UserName, True)
        End If

End Sub


但它总是跳转到Index.aspx

------解决方案--------------------
之前的网页是不是这个项目下的?

总得有记录的session或者cookie 吧
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: