简体   繁体   中英

Session between webpart e Aspx - Sharepoint 2007

Session between 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM