views:

442

answers:

1

The user control is a search screen that consists of a gridview. I am string the filtered results of the gridview in a datatable and storing the datatable in the session. I am accessing the datatable in the session on the next postback.

The problem is that when I am storing the dattable in the session, even though the lines of code don't throw any exception, the web page shows "An unexpected error has occurred". I was able to track down the reason to be the assignment of the session variable with the help of remote debugging.

I had earlier tested the user control outside of sharepoint and checked that it worked perfectly in asp.net page.

I am using sharepoint 2007 and using VS 2008 for development, the framework being used is 2.0. I am very new to sharepoint development and any lead will be very helpful.

A: 

Do you have session state enabled and a SSP configured on the server?

Take a look at this TechNet article.

Magnus Johansson
Thanks for your response,The web.config has the System.Web.SessionState.SessionStateModule added in the httpmodule section, the session state mode is SQL Server and the page section also has the enableSessionState="true" ...