Edit (25-Mar-2005): Newer version here: Url Manipulation v2 (C#) . This class enables you to manipulate and get the QueryString of a page. It also returns the current page's AbsoluteUri (i.e. /path/to/myfile.aspx?param=test), base Url (i.e. /path/to/myfile.aspx) and virtual folder (i.e. /path/to/) Use: UrlQuery MyQuery; private void Page_Load(object sender, EventArgs e) { MyQuery = new UrlQuery("/path/to/myfile.aspx?param=test"); // or to get the current page use: // MyQuery = new UrlQuery() Trace.Write(MyQuery.Url); // returns '/path/to/file.aspx' Trace.Write(MyQuery.VirtualFolder); // returns '/path/to/' Trace.Write(MyQuery.Get()); // returns '?param=test' // change query MyQuery.Set("param2","value2"); Trace.Write(MyQuery.Get()); // returns '?param=test¶m2=value2' // remove 'param' paramater MyQuery.Set("param",null); Trace.Write(MyQuery.Get("param2")); // returns ...