Asp.net 使用资源文件实现双语言
公司交给我个项目,已经完成了一部分,需要做中英文双语言,以前听别人说程序多语言什么的,都不知道从哪下手得。项目架构已经搭好了,大概看了一下,知道是使用资源文件来实现的,不说了,赶紧自己试试吧。试了才会记住,才是自己的O(∩_∩)O~
1. 新建Asp.net Web应用程序ChangeLanuage,新建aspx页面Default.aspx页面转到Default.aspx页面,添加下控件在页面上:
控件类型 控件ID 作用
2. 打开Properties文件夹,选择资源,单击创建资源文件Resources.resx
并添加如下资源资料:
名称 值
Default_Label1_CN 名字:
Default_Label1_EN Name:
Default_Label2_CN 小强
Default_Label2_EN Xiaoqiang
Default_Label3_CN 年龄:
Default_Label3_EN Age:
Default_Label4_CN 18
Default_Label4_EN 18
Default_lbtnChangeLanguage_CN English
Default_lbtnChangeLanguage_EN 中文
我们采用 
相关文档:
许久以前,写过一篇《asp.net页中动态加入样式表文件》,后来发现在使用时如果每页都写这么个函数真是很麻烦,于是自己写了一个Page的派生。将这个函数加了进去。
/**//// <summary>
/// 作者 邹健
///  ......
WCF的架构:using System.ServiceModel;
契约:Contract
[ServiceContract]
public partial interface IContract
{
[OperationContract]
string DocumentWebHostUrl();
}
服务:Service
[ServiceBehavior(IncludeException ......
Paging long articles in ASP.NET using C#
Long articles are better broken into bite-sized chunks over several pages. With static HTML, this is easily achieved by dividing the article into logical separations and creating separate .htm files for each. Here's how to do it using C# for an article that ......
Windows 身份验证提供程序 提供有关如何将 Windows 身份验证与 Microsoft Internet 信息服务 (IIS) 身份验证结合使用来确保 ASP.NET 应用程序安全的信息。 Forms 身份验证提供程序 提供有关如何使用您自己的代码创建应用程序特定的登录窗体并执行身份验证的信息。使用 Forms 身份验证的一种简便方法是使用 ASP.NET 成员资格 ......
public void CreatXml(int oid)
{
XmlTextWriter writer = null;
string fileName ="a"+ oid.ToString() + ".xml";
  ......