Tuesday, March 13, 2012

stuck on this one

I posted this before and it didn't help.
I have a web site in .NET that runs under a virtual directory on my server.
In IIS I virtual pointing to the physical path where the .aspx pages. How
can I the path of the virtual directory and not the physical path?
I have links on my asp.net web form that needs to link to
http://webserver/invoices/page.aspx. I'm getting
c:\site\invoices\pages.aspx. I tried to do a server.mappath and that does
not work. Any suggestions/If you have a link to Page.aspx then just create a hyperlink like this:
<a href="http://links.10026.com/?link=Page.aspx?action=whatever">Text / Image</a>
could you show how you are getting these files listed?
If you are using a file system object to get these you will need to know the
root/starting point, then just append the appropriate DIR to it.
There is no solid way to have the system say that:
c:\dir\dir2\file.ext = http://virt/file.ext
since there could be more then one virtual mapping included to the same
files/folders.
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"NuB" wrote:

> I posted this before and it didn't help.
> I have a web site in .NET that runs under a virtual directory on my server
.
> In IIS I virtual pointing to the physical path where the .aspx pages. How
> can I the path of the virtual directory and not the physical path?
> I have links on my asp.net web form that needs to link to
> http://webserver/invoices/page.aspx. I'm getting
> c:\site\invoices\pages.aspx. I tried to do a server.mappath and that does
> not work. Any suggestions/
>
>

0 comments:

Post a Comment