Solved

how to get the url path from Request object

Posted on 2011-09-15
4
304 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
Comment Utility
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
Comment Utility
Please try:

Request.UrlReferrer.PathAndQuery
0
 
LVL 17

Expert Comment

by:sonawanekiran
Comment Utility
0
 

Author Closing Comment

by:TrialUser
Comment Utility
thx a ton worked perfectly
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now