.net 简体转换繁体实例,繁体转换简体 Encode.dll、下载

王朝学院·作者佚名  2016-05-21
窄屏简体版  字體: 小  |  中  |  大  |  超大  

.net 简体转换繁体实例,繁体转换简体 Encode.dll、下载在项目中先引用Encode.dll 下面是下载地址:

Encode.dll

ChineseConverter.dll

1、html页面代码

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="简繁转换.aspx.cs" Inherits="asp.net_语言基础.简繁转换" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <asp:TextBox ID="txtjian" TextMode="MultiLine" Width="500px" Height="200px" runat="server"></asp:TextBox><br /> <asp:Button ID="btnjtof" runat="server" Text="简体转繁体" onclick="btnjtof_Click" /> <asp:Button ID="btnftoj" runat="server" Text="繁体转简体" onclick="btnftoj_Click" /> <br /> <asp:TextBox ID="txtfan" TextMode="MultiLine" Width="500px" Height="200px" runat="server"></asp:TextBox> </div> </form></body></html>

2、后台.cs代码

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using EncodeMy;namespace ASP.NET_语言基础{ public partial class 简繁转换 : System.Web.UI.Page { PRotected void Page_Load(object sender, EventArgs e) { } protected void btnjtof_Click(object sender, EventArgs e) { EncodeRobert er = new EncodeRobert(); txtfan.Text = er.SCTCConvert(ConvertType.Simplified, ConvertType.Traditional, txtjian.Text); } protected void btnftoj_Click(object sender, EventArgs e) { EncodeRobert er = new EncodeRobert(); txtfan.Text = er.SCTCConvert(ConvertType.Traditional, ConvertType.Simplified, txtjian.Text); } }}

3、效果图

想深入了解的请看:http://www.cnblogs.com/byvar/p/4012861.html

以下是微软的转换:

http://www.microsoft.com/zh-cn/download/details.aspx?id=18970

http://www.microsoft.com/zh-cn/download/details.aspx?id=15251

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航