Hi everybody. Do you know what's equal for code "app.patht" in c#.net 2008 ?
I tried "Application.ExecutablePath" and "Application.StartupPath" but they didn't work. I think they have their own name spaces that I havent added them.
I did what you said but this is my error message :
'System.Web.HttpApplicationState' does not contain a definition for 'StartupPath' and no extension method 'StartupPath' accepting a first argument of type 'System.Web.HttpApplicationState' could be found (are you missing a using directive or an assembly reference?)
What is App.Path? Are you looking for the global and user specific configuration files for your application? If that is the case look at the ConfigurationManager class. If not then please explain what you're after in more detail
I was trying to run code "string p = Application.StartupPath;" in my web application project while it only works in windows applications. So I found this code and it works :
"string RepPath = Server.MapPath("File Name");"
This code returns address of file "File Name"
Dim Adapter As New OleDbDataAdapter
Dim Command As New OleDbCommand
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
sqlQuery = MainQuery ...