To remove parameter from URL

  • Thread starter Thread starter Sara T.
  • Start date Start date
Just copy the parameters you need when creating the new link :

If Request.QueryString.Count<>1 Then
NewLink"=default.aspx?param3=" & Request.QueryString("param3")
Response.Redirect(NewLink)
End If

Patrice
 
Actually, I don't know the amount of parameter and what they are.

Your process is quite simple and it will work if I know to keep parameter 3
but in the real world I don't know.

I like some functions (if it has) to add or remove parameter on URL as a
dynamic.

Any ideas ?
 
What is the exact goal ?

How do you know which parameters are to be kept and/or needed ? Also you
could just leave them as it doesn't matter if they are not used by your
page.

Parameters are issued by an original link. Usually if they are included,
they have some usage. The best way would be to have a link with the
appropriate parameters in the first place...

Patrice

--
 
I mean if VS.NET has already functions or API such as Request.Add("param1",
"123"), Request.Remove("param2"), that might be easier to use it.
 
Back
Top