Sharepoint: Reserved Keyword id in QueryString

October 27th, 2011 by jason Leave a reply »

This is a caveat which may save you hours of pulling your hair out and/or banging your head against the wall.

When passing paramaters via the querystring in any sharepoint webpart user control , the term “id” is reserved, and any functionality depending on this querystring parameter will break.

http://idontthinkyourereadyforthisjelly/Pages/ViewJelly.aspx?id=001 – Invalid

http://idontthinkyourereadyforthisjelly/Pages/ViewJelly.aspx?jellyId=001 – Valid

So, in short, use any other word except “id” for passing querystring parameters in Sharepoint.  If I had found this out before many hours of frustration, I would most likely have hugged the poster, unless it was a guy, well maybe if he was Swedish…

 

 

Advertisement

Leave a Reply