Re: getting an absolute path
- From: "Juan T. Llibre" <nomailreplies@xxxxxxxxxxx>
- Date: Thu, 17 Nov 2005 14:55:09 -0400
<%@ page language="VB" %>
<script runat="server">
Public Sub Page_Load(Sender As System.Object, E As System.EventArgs)
Dim root as String = Server.MapPath("/")
Label1.Text = root
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Root Path</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text=""></asp:Label>
</div>
</form>
</body>
</html>
See it working at : http://asp.net.do/test/rootpath.aspx
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"PJ6" <nobody@xxxxxxxxxxx> wrote in message news:OFyfhZ66FHA.632@xxxxxxxxxxxxxxxxxxxxxxx
> Is it possible to get the absolute path (i.e. C:\inetpub\wwwroot) of the IIS root
> directory?
.
- References:
- getting an absolute path
- From: PJ6
- getting an absolute path
- Prev by Date: How do I make my database secure?
- Next by Date: DataGrid display
- Previous by thread: Re: getting an absolute path
- Next by thread: File Upload Without Caching
- Index(es):
Relevant Pages
|
Loading