Saturday, March 24, 2012

MapPath Problem

Hey,

Sorry if my Englise Not so good...Embarrassed

I need to use MapPath Function with my Database(access).

I Use a Microsoft Visual Web Dev.

Here my Connection string:

Private objConnAs New OleDbConnection("Provider=" & _"Microsoft.Jet.OLEDB.4.0;" & _"Data Source=C:\websites\myWebSite\Website.mdb")
This is work.
But When i need to upload my website to the Server i need to use MapPath.
How i use the MapPath Function in aClass File?
Thanks!
You need to use System.Web.HttpContext.Current.Server.MapPath.

0 comments:

Post a Comment