given is an URL like http://localhost:1973/Services.aspx?idProject=10&idService=14.
What is the most straightforward way to replace both url-paramet
the C# HttpUtility.ParseQueryString utility will do the heavy lifting for you. You will want to do some more robust null checking in your final version.
// Let the object fill itself
// with the parameters of the current page.
var qs = System.Web.HttpUtility.ParseQueryString(Request.RawUrl);
// Read a parameter from the QueryString object.
string value1 = qs["name1"];
// Write a value into the QueryString object.
qs["name1"] = "This is a value";