Problem while accessing query string values.

Vote:
 

Hi All,

I am passing the query string in an ancor tag href attribute like below,

abc

In home.aspx i am trying to access the total href value using the following code like below, but i am not able to get it. 

string URL = HttpContext.Current.Request.Url.AbsoluteUri

It gives only home.aspx instead of whole url along with querystrings. Please give me a solution to find the query string values.

Thanks,

WS.

#121044
Apr 30, 2015 11:39
Vote:
 

Hi Feroz,

              I am also facing the same problem any one can help us as soon as possible

#121046
Apr 30, 2015 11:43
Vote:
 

Perhaps: HttpContext.Current.Request.Url.ToString().

Or maybe: int width = int.Parse(HttpContext.Current.Request.QueryString["width"])

#121055
Apr 30, 2015 12:51
Vote:
 

Hi Johan Kronberg,

while accessing the url using your code part its retrun the same result like below

"http://localhost:7777/Home.aspx"

#121065
Apr 30, 2015 13:31
Vote:
 

What about Request.RawUrl ?

#121083
Apr 30, 2015 20:05
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.