None of these will work for a virtual directory. The Virtual directory URL is http://mysite.com/virDir and when I hard code the DataNavigateUrlFormatString = "~/VirDir/{0}" everything works fine. I store the virtual directory string in a table and retrieve it during the page load event. I may need to move the process to a different event possibly, but I need to dynamically populate the DataNavigateUrlFormatString to equal this "~/VirDir/{0}" . I'm thinking the databinding event. Any ideas? Here is my Page Load event:
Dim mySqlString As New StringBuilder()
mySqlString.Append("SELECT SettingValue ")
mySqlString.Append("FROM {databaseOwner}{objectQualifier}ModuleSettings ")
mySqlString.Append("WHERE ModuleID = " & ModuleId)
Using dr As IDataReader = DataProvider.Instance().ExecuteSQL(mySqlString.ToString())
While dr.Read
myPath = Convert.ToString(dr("SettingValue"))
End While
End Using
Dim dirInfo As New IO.DirectoryInfo(Server.MapPath(myPath))
articleList.DataSource = dirInfo.GetFiles()
articleList.DataBind()