<%@ 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" <no****@nowhere.net> wrote in message news:OF*************@TK2MSFTNGP10.phx.gbl...
Is it possible to get the absolute path (i.e. C:\inetpub\wwwroot) of the IIS root
directory?