Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6097725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:04:35+00:00 2026-05-23T13:04:35+00:00

Plase guide me how to get URL path excluding page name on localhost and

  • 0

Plase guide me how to get URL path excluding page name on localhost and server.

for example for the page Active.aspx local path that I want to get is here in bold.

*http://localhost:1532/WebFolder/*Active.aspx

and on server I want to get this bold part

*http://domain.com/WebFolder/*Active.aspx

Similarly if page is in root it will return

*http://domain.com/Active.aspx or *http://localhost:1532/**Active.aspx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:04:35+00:00Added an answer on May 23, 2026 at 1:04 pm

    Request.ApplicationPath – Gets the ASP.NET application’s virtual application root path on the server.

    Request.Path – Gets the virtual path of the current request.

    Edit

    To get domain + current request + virtual path of the current application, try below:

    Request.Url.GetLeftPart(UriPartial.Authority) + Request.ApplicationPath
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone please guide about how we can get exact url and store in
I get the famous error The security validation for this page is invalid. Click
I have a query. Can someone please guide me how to get my MOBILE
Please guide what is meaning by Web is stateless in simple words ? Kindly
Can some one please guide me to understand which jar file i need to
Can you please guide me what is session and session variables? I don't need
Please recommend some websites with a quick guide. MSDN is good but it's hard
Tip me plase, how to insert a null value into table using Trolltech Qt
Please consider this example class: [Serializable] public class SomeClass { private DateTime _SomeDateTime; public
i tried to get the current web using client object model. i am not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.