Get querystring from URLReferrer
Asked Answered
B

2

30

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")

Becket answered 25/3, 2011 at 16:53 Comment(0)
P
77

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")
Pled answered 25/3, 2011 at 17:2 Comment(0)
J
1

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

HttpUtility.ParseQueryString(Request.UrlReferrer.Query).GetValues("SYSTEM")(0)
Jovia answered 29/6, 2015 at 14:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.