为什么我的Response.Redirect不起作用? [英] Why my Response.Redirect didn't work?

查看:516
本文介绍了为什么我的Response.Redirect不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想respose.Redirect到其他页面,但它没有用。这是我背后的代码





 受保护  Sub  gvList_RowCommand(sender  As   Object , e  As  GridViewCommandEventArgs)
如果 e.CommandName = cmd选择 然后
Response.Redirect( frmLogin.aspx
结束 如果
结束 Sub

解决方案

检查当前表格和登录表格是否必须位于相同的申请文件夹中。

如果不是在同一文件夹中使用Response。重定向(〜\FolderName \ frmLogin.aspx)


使用thiz



的Response.Redirect( 〜\Foldername\frmLogin.aspx)


I want to respose.Redirect to other page, but it didn't work. Here is my code behind



Protected Sub gvList_RowCommand(sender As Object, e As GridViewCommandEventArgs)
        If e.CommandName = "cmdChoose" Then
            Response.Redirect("frmLogin.aspx")
        End If
    End Sub

解决方案

Check that the current form and Login Form must be in the same folder of application.
If they are not in the same folder the use Response.Redirect("~\FolderName\frmLogin.aspx")


use thiz

Response.Redirect("~\Foldername\frmLogin.aspx")


这篇关于为什么我的Response.Redirect不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆