29

I am trying to get the QueryString value like this Request.QueryString("SYSTEM") from a UrlReferrer. I see i can use this Request.UrlReferrer.Query() but it doesn't allow me to specify the exact parameter

I could parse the Query() value, but I want to know if it is possible to do something like this Request.UrlReferrer.QueryString("SYSTEM")

Charles
  • 50,943
  • 13
  • 104
  • 142
FarFigNewton
  • 7,108
  • 13
  • 50
  • 77

2 Answers2

75

You could do

HttpUtility.ParseQueryString(Request.UrlReferrer.Query)["SYSTEM"]

That is c# in vb is is probably something like

HttpUtility.ParseQueryString(Request.UrlReferrer.Query())("SYSTEM")
Chris Mullins
  • 6,677
  • 2
  • 31
  • 40
1

In VB.NET, one way to get the value of "SYSTEM" from the UrlReferrer is:

HttpUtility.ParseQueryString(Request.UrlReferrer.Query).GetValues("SYSTEM")(0)
majestzim
  • 518
  • 6
  • 16