I am trying to make 2 variables available throughout my site. I am parsing the URL in order to retreive both of them.
This code on the page itself works fine.
Dim countryLanguage As String
countryLanguage = (Request.ServerVariables("URL"))
Dim langVar = (Mid(countryLanguage, 2, 2))
Dim countryVar = (Mid(countryLanguage, 5, 2))
I have created a class file the code for which is below. With this I get a complilation error (BC30451: Name 'Request' is not declared.).
Public Class url_parser
Public Shared Function urlVars(ByVal langVar, ByVal countryVar) As String
Dim countryLanguage As String
countryLanguage = (Request.ServerVariables("URL"))
Dim langVar = (Mid(countryLanguage, 2, 2))
Dim countryVar = (Mid(countryLanguage, 5, 2))
End Function
End Class
Thanks