在ASP.NET中,重定向可以通过Response.Redirect
方法实现。以下是一个简单的示例:
protected void ButtonRedirect_Click(object sender, EventArgs e)
{
// 重定向到另一个页面
Response.Redirect("AnotherPage.aspx");
}
在这个示例中,当用户点击名为ButtonRedirect
的按钮时,应用程序将重定向到名为AnotherPage.aspx
的页面。请确保将AnotherPage.aspx
替换为您要重定向到的实际页面。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:asp.net 重定向如何实现条件重定向