I'm currently working on an ASP.Net Website running in Sharepoint.Let me just give you some background info before I get to the problem..I develop UserControls which are then added to as webparts on the sharepoint pages.Some of these webparts are loaded dynamically as the sharepoint page loads.This is how we do this:
- Create an application page (InfoPage) that loads the actual user control into the application page
- Create an UserControl (InfoContainer) which scrapes the 'InfoPage' and adds it into a div in the 'InfoContainer' using the following code:
- So then this container is put into the SharePoint page...
- Disabling EnableViewstate on all controls (__VIEWSTATE hidden fields are still there)
- Removing __VIEWSTATE fields on Page_Init (This causes ViewStateMac errors)
- Setting viewstate encryption mode to 'never' (Doesn't make a difference)
- Disabling and encryption and viewstateMac in config. (Get SessionState Error)