I am trying to make 2 variables available on my site. I am parsing the url to recover both of them.
This code on the page itself works great.
Dim countryLanguage As String
countryLanguage = (Request.ServerVariables("URL"))
Dim langVar = (Mid(countryLanguage, 2, 2))
Dim countryVar = (Mid(countryLanguage, 5, 2))
I created a class file whose code is below. In doing so, I get a compilation error (BC30451: Name 'Request' 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
thank
Billz source
share