Модератор: Ramzes
Imports System.Net
Imports System.IO
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Write(GetResponse("http://mysite.ru/default.aspx?ln=en"))
End Sub
Private Function GetResponse(ByVal url As String) As String
Dim request As HttpWebRequest
Dim response As HttpWebResponse
request = CType(WebRequest.Create(url), HttpWebRequest)
response = CType(request.GetResponse, HttpWebResponse)
Dim stream As Stream = response.GetResponseStream
Return New StreamReader(stream).ReadToEnd
End Function
Dim CurrentLanguage As String = Request("lang")
If Not Threading.Thread.CurrentThread.CurrentUICulture.Name.ToLower() = CurrentLanguage.ToLower() Then
Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo(CurrentLanguage)
Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(CurrentLanguage)
End If
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 18