![]() |
|
home > news SharePoint Layouts Page - Exception Message: Value cannot be null. Parameter name: g SharePoint Layouts Page - Exception Message: Value cannot be null. Parameter name: gHaving just wasted over an hour, I felt it worth sharing my resolution to this gem of an error. Typically, the error is quite generic, but in my case, the problem was caused by including SharePoint controls that relied upon particular querystring entries existing – namely, List=GUID. So – a bit of background… I am creating an additional list settings page for managing some custom developed stuff – and so I took a copy of an existing list settings page so that I could use the same controls and formatting to get the section effect. In doing this, I left the main content in there (just to prove that I could see my page and it was happy with my code-behind reference), deployed the layouts page to the 12 folder and then pointed straight to it in the browser. In theory this should just work – it was, of course, a simple initial test … but – after adding the OK button event handler to my code-behind class, among other things, I ended up with the error above. After an amount of fiddling around I worked out that the “SharePoint:FormattedStringWithListType” control relies upon the List= querystring entry but doesn’t provide any kind of appropriate message to let you know that’s what the problem is. I hope this saves you someone some time! Posted on SharePoint Blogs FFTF News Archives : News Articles Archives: Apr 2005 | Aug 2005 | Dec 2005 | Feb 2005 | Jul 2005 | Jun 2005 | Mar 2005 | May 2005 | Nov 2005 | Oct 2005 | Sep 2005 | Oct 2005 | Nov 2005 | Dec 2005 | Jan 2006 | Feb 2006 | Mar 2006 | Apr 2006 | May 2006 | Jun 2006 | July 2006 | August 2006 | September 2006 | October 2006 |
|