It's still string manipulation, but how about something like:
String.Concat("?",
String.Join("&",
Request.Url.Query.Substring(1)
.Split('&')
.Where(k => !k.StartsWith("IDL="))
.ToArray() // For .NET versions prior to v4.0
)
)
Alternatively you could use Request.QueryString to get at a processed collection of query-string parameters.
EDIT: This will leave your parameters in the order they were sent.
Here's a sample ASPX page that outputs a modified query-string (I've tested it in a ASP.NET 3.5 Web-Site):
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Import Namespace="System.Linq" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Query String Removal</title>
</head>
<body>
Modified query-string: <%=
String.Concat("?",
String.Join("&",
Request.Url.Query.Substring(1)
.Split('&')
.Where(k => !k.StartsWith("IDL="))
.ToArray() // For .NET versions prior to v4.0
)
)
%>
</body>
</html>
NOTE: System.Linq has been imported. An exception will be raised if you don't specify a query-string.
Request.Url.Querylater on to beleive that the query string value isn't there?"