开发者

sharepoint: Server.Transfer?

I am writing some code for sharepoint to transfer from this page to another page:

Server.Transfer("/DefectManagement/DefectList/default.aspx")

Bu开发者_运维技巧t I got this problem:

Error 1 'Microsoft.SharePoint.Portal.Topology.Server' does not contain a definition for 'Transfer'

How would this issue be done in sharepoint?

Thanks in advance.


The Server reference you have there (Microsoft.SharePoint.Portal.Topology.Server) is not the Server reference (System.Web.HttpServerUtility) you are looking for.

Try

System.Web.HttpContext.Current.Server.Transfer();
HttpContext.Current.Server.Transfer();
Page.Server.Transfer();

And yes, SPUtility.Redirect is better for sharepoint


You should use SPUtility.Redirect

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜