Solved

how to get the url path from Request object

Posted on 2011-09-15
4
348 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

Independent Software Vendors: 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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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