开发者

Session between webpart e Aspx - Sharepoint 2007

Session betwee开发者_如何学JAVAn webpart e Aspx - Sharepoint 2007 I trying to transfer some information in Session, but using Responde.Redirect doesn't work. When I use Server.Transfer(url) needs to go to /site-test/_layouts/teste.aspx, but just works when I use Server.Transfer with _layouts/teste.aspx

Can anybody help me?


Server.Transfer and Response.Redirect do not work in SharePoint, You should use SPUtility.Redirect instead. Furthermore, sessions are not enabled in SHarePoint by default (only in multiserver farms I think). You have to enable it in Central Admin. See this post on how to do that.

Be aware sessions can be a tricky thing when your front-ends are behind a load-balancer, when that is not set to sticky sessions, postbacks could fail.

Another thing, if you want webparts to communicate, there is a mechanism in place just for that, Sahil Malik covers the basics (ASP.NET) here, and how it is done in Sharepoint here. For more info, google for sharepoint webpart communication.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜