zoukankan
html css js c++ java
CultureInfo学习
<%
@ Page Language
=
"
C#
"
ResponseEncoding
=
"
utf-8
"
%>
<%
@Import Namespace
=
"
System.Globalization
"
%>
<%
@Import Namespace
=
"
System.Threading
"
%>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
>
<
script
runat
="server"
>
protected
void
Page_Load(object send, EventArgs e)
{
HtmlTableRow r;
HtmlTableCell c;
int
row
=
0
;
//
Titel
r
=
new
HtmlTableRow();
r.BgColor
=
"
#0065CE
"
;
c
=
new
HtmlTableCell(); c.InnerText
=
"
Name
"
; c.Attributes.Add(
"
style
"
,
"
color:#ffffff;text-align:center;font-weight: bold
"
); r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
"
DisplayName
"
; c.Attributes.Add(
"
style
"
,
"
color:#ffffff;text-align:center;font-weight: bold
"
); r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
"
EnglishName
"
; c.Attributes.Add(
"
style
"
,
"
color:#ffffff;text-align:center;font-weight: bold
"
); r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
"
NativeName
"
; c.Attributes.Add(
"
style
"
,
"
color:#ffffff;text-align:center;font-weight: bold
"
); r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
"
LCID
"
; c.Attributes.Add(
"
style
"
,
"
color:#ffffff;text-align:center;font-weight: bold
"
); r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
"
语言代码
"
; c.Attributes.Add(
"
style
"
,
"
color:#ffffff;text-align:center;font-weight: bold
"
); r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
"
ISO 639-1代码
"
; c.Attributes.Add(
"
style
"
,
"
color:#ffffff;text-align:center;font-weight: bold
"
); r.Cells.Add(c);
objTable.Rows.Add(r);
foreach (CultureInfo culture
in
CultureInfo.GetCultures(CultureTypes.SpecificCultures))
{
r
=
new
HtmlTableRow();
if
(row
%
2
==
1
)
r.BgColor
=
"
Gainsboro
"
;
c
=
new
HtmlTableCell(); c.InnerText
=
culture.Name; r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
culture.DisplayName; r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
culture.EnglishName; r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
culture.NativeName; r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
culture.LCID.ToString(); r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
culture.ThreeLetterISOLanguageName; r.Cells.Add(c);
c
=
new
HtmlTableCell(); c.InnerText
=
culture.ThreeLetterWindowsLanguageName; r.Cells.Add(c);
objTable.Rows.Add(r);
row
++
;
}
}
</
script
>
<
html
xmlns
="http://www.w3.org/1999/xhtml"
>
<
head
>
<
title
>
CultureInfo
</
title
>
<
style
>
td
{
}
{
font-size
:
12px
}
</
style
>
</
head
>
<
body
bgcolor
="white"
leftmargin
="0"
>
<
form
id
="form1"
runat
="server"
>
<
div
>
<
table
id
="objTable"
runat
="server"
></
table
>
</
div
>
</
form
>
</
body
>
</
html
>
查看全文
相关阅读:
第一次博客园作业
弹性布局/流动式布局
元素在网页或视口上位置的相关问题求解
element
给body设置高度
盒模型宽高的获取和设置
选择器
变量、作用域和内存问题
js之捕捉冒泡和事件委托
transition transform animate的使用
原文地址:https://www.cnblogs.com/goodspeed/p/26494.html
最新文章
Intelli idea 学习笔记
Android Studio在创建项目是一直处于building “project name”gradle project info的解决办法
Mactype导致卡巴斯基2017 .net Framework client profile 安装失败。
Oracle怎样标记坏块及一次数据恢复
ORA-12538: TNS: no such protocol adapter
E2202 Required package 'rtl' not found"
如何用 Delphi 创建系统服务程序?
SQL Server 2008 R2 启动企业管理器,出现“无法读取此系统上以前注册的服务器的列表”
xp共享文件win7访问时不能保存密码
delphi XE seattle 二维码开发
热门文章
DVWA靶场(二、命令执行)
DVWA靶场(一、暴力破解)
2~16进制间任意进制转换器
第一次博客作业
知识总结
数据结构、算法、线性表学习总结
c语言文件操作
进制转换器
初学c语言
第二次博客园作业:函数+进制转换器v1.0beta
Copyright © 2011-2022 走看看