Solved

how to get the url path from Request object

Posted on 2011-09-15
4
337 Views
Last Modified: 2012-05-12
I have a URL that looks like  :
http://localhost:19115/somepager.aspx?mfg=AM JACQUARD&mod=amtext 222

I want to be able to get the "somepager.aspx?mfg=AM JACQUARD&mod=amtext 222"
alone. How can I get it from the request object. Getting the Request.UrlReferrer.AbsolutePath

returns only "/somepager.aspx" and not the the query string. Please help thanks        
0
Comment
Question by:TrialUser
4 Comments
 
LVL 22

Accepted Solution

by:
pivar earned 500 total points
ID: 36546003
Hi,

Have you tried Request.Url.PathAndQuery
or you could use Request.UrlReferrer.AbsolutePath + Request.UrlReferrer.Query

/peter
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36546035
Please try:

Request.UrlReferrer.PathAndQuery
0
 
LVL 17

Expert Comment

by:sonawanekiran
ID: 36547380
0
 

Author Closing Comment

by:TrialUser
ID: 36548813
thx a ton worked perfectly
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question