<%@ Page Language="VB" %>
<%@ Import Namespace="System.Globalization" %>
<script runat="server">
sub Page_Load(Sender as Object, e as EventArgs)
dim objRegion as RegionInfo
if Page.IsPostBack then
objRegion = new RegionInfo(btRegion.Text)
else
objRegion = RegionInfo.CurrentRegion
end if
lblMessage.Text = "Region: " & objRegion.Name & "<br>"
lblMessage.Text += "Full name: " & objRegion.EnglishName & "<br>"
lblMessage.Text += "Currency: " & objRegion.CurrencySymbol & "<br>"
lblMessage.Text += "ISO Currency: " & objRegion.ISOCurrencySymbol & "<br>"
lblMessage.Text += "Abbreviation: " & objRegion.ThreeLetterISORegionName & "<br>"
lblMessage.Text += "Metric system: " & objRegion.IsMetric
end sub
</script>
<html><body>
<form runat="server">
<b>Your information:</b>
<asp:Label id="lblMessage" runat="server"/>
Change to (i.e. 'US', 'FR', 'JP', etc):
<asp:TextBox id="btRegion" runat="server"
AutoPostBack=true />
</form>
</body></html>
|