.net - ASP.NET - 如何从用户控件中使用 Response.Redirect()? (.ascx)

标签 .net asp.net

我正在将一些 ASPX 页面转换为用户控件 (ASCX)。

我仍然需要一些页面重定向才能工作..并且 server.transfer 不是一个选项(我需要更改地址栏中的 URL)。

有没有办法从用户控件或类似的方法中使用 Response.Redirect() ?

最佳答案

在 UserControls 中使用 Page.Response.Redirect()。

关于.net - ASP.NET - 如何从用户控件中使用 Response.Redirect()? (.ascx),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2262761/

相关文章:

.net - .NET 中的只读数组

javascript - 使用 Javascript 禁用 gridview 中的文本框

c# - 自定义 OutputCache 提供程序不工作(调用 get 但未设置或添加)

asp.net - 如何使用 C# 将 Gridview 的数据导出到 Excel?

c# - "Exception of type ' System.Exception '' was thrown"的写法从何而来?

c# - 无法从 'method group' 转换为 'Func<string, string, bool>'

.net - 在 SQL Server 2005 上进行生产并针对 SQL Server 2008 进行开发的风险有多大

c# - 使用 Jira SOAP API 的 PasswordEncoderNotFoundException

asp.net - 如何使用 ASP.NET 发送 301 永久重定向?

.net - Visual Studio 中 .NET 桌面应用程序上的 HTML5 UI