Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Using session object in Webpart page

  Asked By: Gaurang    Date: Apr 20    Category: Sharepoint    Views: 4446

I am creating the webpart page in the sharepoint site using
WebCustomControl(C#). Is it possible to use the session object in this
Webcustom Control.

I am using
Context.session["userid"]="admin" ;

Both remains in error. Please guide me how to use the session object
in the Webpart page.



3 Answers Found

Answer #1    Answered By: Himanta Barthakur     Answered On: Apr 20

It's not a good practise to use Session Object to use in sharepoint  environment.
But If you dont have any other alternative...this link will do the work for you.


Answer #2    Answered By: Mansi Revenkar     Answered On: Apr 20

I think u need to explicitly enable the session  for sharepoint  site in
the web.config. By default it is off

<add name="Session" type="System.Web.SessionState.SessionStateModule" />

Answer #3    Answered By: Lizette Mcconnell     Answered On: Apr 20

I will try with this..................

Didn't find what you were looking for? Find more on Using session object in Webpart page Or get search suggestion and latest updates.