Solved

how to get the url path from Request object

Posted on 2011-09-15
4
352 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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