Web developers wiki ASP.NET Sitecore Sharepoint Kentico by Evident Interactive

Sitecore has a easy way to add or remove querystring parameters to a url. The class to achieve this can be found in Sitecore.Text and is called "urlstring".

Here is small example:

UrlString Url = new UrlString( WebUtil . GetRawUrl() ); Url.Add("sc_lang", Sitecore.Context.Language.Name);

this code adds a query string parameter named "sc_lang" with the current sitecore language as value to the current url You can also use the property .remove to remove a parameter or try one of the other options.

 © Evident Interactive BV