hi, im new to asp.net and trying to define a global value. i dont want to
use web.config because i want to be able to run my app on any sub folder
without created an application in iis.
so far i got below in my functons.vb
------------------------
Public Class MyFunctions
Public Shared Function MyDbPath() As String
Return "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source=|DataDir ectory|bookmark s.mdb;User Id=admin;Passwo rd=;"
End Function
Public Shared Function AlphaNumOnly(By Val MyString As String) As String
Dim sResult As String
sResult = Trim(MyString)
If Not sResult = "" Then
sResult = Regex.Replace(M yString, "[^a-z|A-Z|0-9|\.|\-]{1,50}",
"")
End If
Return sResult
End Function
end class
----------------------------------------------
i can use AlphaNumOnly function anywhere within my code and works fine but
when i try to use myfunctions.MyD bPath() i get error saying ' MyDbPath is
not member of MYNameSpace.Myf unctions
I can;t see what im doing wrong.
thanks
use web.config because i want to be able to run my app on any sub folder
without created an application in iis.
so far i got below in my functons.vb
------------------------
Public Class MyFunctions
Public Shared Function MyDbPath() As String
Return "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source=|DataDir ectory|bookmark s.mdb;User Id=admin;Passwo rd=;"
End Function
Public Shared Function AlphaNumOnly(By Val MyString As String) As String
Dim sResult As String
sResult = Trim(MyString)
If Not sResult = "" Then
sResult = Regex.Replace(M yString, "[^a-z|A-Z|0-9|\.|\-]{1,50}",
"")
End If
Return sResult
End Function
end class
----------------------------------------------
i can use AlphaNumOnly function anywhere within my code and works fine but
when i try to use myfunctions.MyD bPath() i get error saying ' MyDbPath is
not member of MYNameSpace.Myf unctions
I can;t see what im doing wrong.
thanks
Comment