Web Application Path question

Results 1 to 2 of 2

Thread: Web Application Path question

  1. #1
    Join Date
    Dec 1969

    Default Web Application Path question

    How can i get Web Application Path in .NET?<BR>such as my application run in web server<BR>"http://localhost/mylab/default.aspx"<BR>how can i get "http://localhost/mylab/" in application?

  2. #2
    Join Date
    Dec 1969

    Default RE: Web Application Path question

    If I understand correctly, the example should answer your quesiton:<BR><BR>Dim Conn as new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " & _<BR>"Data Source= " & Server.MapPath("/AspNet/Handicaps.mdb"))<BR><BR>The actual path is:<BR><BR>C:/Inetpub/wwwroot/AspNet/Handicaps.mdb<BR><BR>TomT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts