2011-12-26 81 views
-1

我在c#中使用ASP.Net的GridView中有一个自定义按钮。如何在CustomButtonCallback中使用Response.Redirect(FileDownloadUrl)

如何,我可以使用:

Response.Redirect(FileDownloadUrl) 
在CustomButtonCallback程序


我使用这个命令 的Response.Redirect(FileDownloadUrl,FALSE)

我收到以下错误 时 “的Response.Redirect不能在一个页面回调调用。”

+0

请显示验证码。您可以使用JavaScript - window.location.href。 – adatapost 2011-12-26 04:34:04

+0

没有我在ASP.NET中使用c# – saeedHF 2011-12-26 08:51:18

+0

需要更多详细信息 – 2011-12-26 08:54:23

回答

0

的Response.Redirect(FileDownloadUrl,FALSE)

+0

Response.Redirect(FileDownloadUrl,false) – saeedHF 2011-12-27 10:47:38

0

我知道,这不是回答你的问题。但也许你应该使用Server.Transfer而不是Response.Redirect。您可以保存更多的旅行到服务器。

相关问题