Get Request.UserLanguages : Request « Page Lifecycle « ASP.NET Tutorial






<%@ Page Language="VB" %>
<%@ Import Namespace="System.Globalization" %>

<script runat="server">
   sub Page_Load(Sender as Object, e as EventArgs)
      dim strLanguage as string = Request.UserLanguages(0).ToString
      
      lblMessage.Text = "Primary language: " & strLanguage & "<br>"
      
      dim objCulture as new CultureInfo(strLanguage)
      lblMessage.Text += "Full name: " & objCulture.EnglishName & "<br>"
      lblMessage.Text += "Native name: " & objCulture.NativeName & "<br>"
      lblMessage.Text += "Abbreviation: " & objCulture.ThreeLetterISOLanguageName & "<br>"
      lblMessage.Text += "Current Time: " & DateTime.Now.ToString("D", objCulture) & "<br>"
      lblMessage.Text += "Parent: " & objCulture.Parent.EnglishName & "<br>"
      
   end sub   
</script>

<html><body>
   <b>Your user information:</b> 
   <asp:Label id="lblMessage" runat="server"/>
</body></html>








5.8.Request
5.8.1.Get Request.UserLanguages
5.8.2.Request.UrlReferrer
5.8.3.Request.QueryString
5.8.4.Request.Cookies
5.8.5.Get browser information
5.8.6.Request.ServerVariables
5.8.7.Filtering the HTTP Request body using InputStream
5.8.8.Showing Parameters via the Params Collection in ASP.NET
5.8.9.Getting cookie values
5.8.10.Displaying additional path information in ASP.NET
5.8.11.Showing QueryString values via the QueryString Collection in ASP.NET
5.8.12.Displaying the HTTP headers collection in ASP.NET
5.8.13.Displaying the Request.FilePath property in ASP.NET
5.8.14.Request.Headers