Pseudo Knowledge Base

Useful stuff I've collected... Enjoy.
posts - 25, comments - 25, trackbacks - 0

My Links

News

Tag Cloud

Archives

Post Categories

Getting the URL Query string values in a Web Part

While trying to create a SharePoint 2007 web part I hit a problem that my web searches did not come up with any answers.  The problem was I needed the web part that was imbedded in SharePoint to access the query string.  I lucked out when examining the objects when debugging the code.  The context object is available to the web part and it holds a pointer to the HttpRequests object which includes the Query string property.
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Monday, November 03, 2008 10:57 PM | Filed Under [ SharePoint ]

Feedback

Gravatar

# re: Getting the URL Query string values in a Web Part

beautiful... thank you... was wrestling with this myself till just now :)
4/14/2009 8:47 AM | michael
Gravatar

# re: Getting the URL Query string values in a Web Part

Thank uuuuuuuuu... so much.. this help me a lot.......... wow... a beautiful and rare article...
the way to use this is Context.Request[string key name]ToString();
8/6/2009 8:05 AM | Pooja Trivedi
Gravatar

# re: Getting the URL Query string values in a Web Part

I can not get it to work. I'm doing it in the CreateChildControls event. Are there any restriction on which event handler the querystring has to be read from?
2/15/2010 4:43 PM | Dave
Gravatar

# re: Getting the URL Query string values in a Web Part

Thanks
it really helps :)
10/24/2010 6:36 AM | Ahmed
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: