473,898 Members | 2,914 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to return the full virtual path if I pass the url as "~/default.aspx"?

ABC
How to return the full virtual path if I pass the url as "~/default.aspx"?

I expected this should result as http://aaa.bbb.com/default.aspx.
Mar 27 '06 #1
2 1512
Hello ABC,

asuming you want to have the requested url in your code,
I found that using either:

Response.Write( Request.RawUrl. ToString)
gives (in my case) /wsNET/testform.aspx

and

Response.Write( Request.Url.ToS tring)
gives (also in my case) http://localhost:1124/wsNET/testform.aspx

Notice the difference in the request.url and the request.rawurl

ofcourse you can also dim a pair of strings receiving the url text.

Egu

Mar 27 '06 #2
ABC wrote:
How to return the full virtual path if I pass the url as
"~/default.aspx"?
I expected this should result as http://aaa.bbb.com/default.aspx.


Something like:

Request.Url.Hos t + ResolveUrl(url)

--

Riki
Mar 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
13487
by: cppaddict | last post by:
Hi, I know that it is illegal in C++ to have a static pure virtual method, but it seems something like this would be useful when the following 2 conditions hold: 1. You know that every one of your Derived classes will need to implement some method, but implement it differently, and that the base class cannot implement it. This is where pure virtual comes in.
175
8969
by: Ken Brady | last post by:
I'm on a team building some class libraries to be used by many other projects. Some members of our team insist that "All public methods should be virtual" just in case "anything needs to be changed". This is very much against my instincts. Can anyone offer some solid design guidelines for me? Thanks in advance....
2
1653
by: EP | last post by:
I'm using HttpRuntime.Process to process asp.net and web service requests. My question is, is it possible to dynamically provide that "file contents" of the asmx to the runtime? I'd like to dynamically publish items but not actually have them located in a physical file. Is this possible? So the request would be for server/myApp/SomeFile.asmx, and instead of letting the HttpRuntime pick up that file I would give it what I thought the...
2
5367
by: Murphy | last post by:
Our website contains subdirectories for each subsidiary company, each company has it's own look and feel to the pages in their subdirectory although they are all part of the main website. The code below in the Web.Config file defines the authentication as forms and the aspx file required for login if the user is unauthenticated... this works well for the root level company web pages however when a user viewing the website of SubCompanyA...
3
2464
by: Alejandro Becker | last post by:
Hi, I have Windows 2000 SP4. is domain controller. and Visual studio 2003 I get the error: Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\sitio\16a5fc06\770e5f27" is denied. when I try to acces to the site. Please I need Help.
5
3399
by: Francesc | last post by:
Hi, I'm programming some classes in order to be able to import different text formats (TXT, RTF, HTML, ...) to my own format called RUF. I've defined one Solution within several Projects, each one is focused in one specific format, includes from 5 to 15 classes and produces one DLL. Solution GATEWAY:
9
4021
by: larrybud2002 | last post by:
I've read about this error in this group and others from early 2006 but without any resolution, so I thought I'd bump it up to see if there's a solution. Trying to build a website on http://oursite:8080/ and it returns
5
1569
by: .rhavin grobert | last post by:
guess you have the following classes... ___________________________________ class { //..a couple of methods ...// }; class A { public: //...// B* GetB() // <- this we'll talk about
0
1288
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys I'm using a URLRewrite module to redirect certain URLs in my .net 2.0 website. However I am getting som really bizarre behaviour public void UrlRewriter_BeginRequest(object sender, System.EventArgs e) { HttpApplication app = (System.Web.HttpApplication)sender; string url = app.Request.RawUrl.ToLower(); //app.Context.RewritePath("/idtest.aspx?sid=" + GetStoryID(url)
0
9993
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11256
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10857
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8034
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5877
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4705
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3303
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.