码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2014-11-08 11:50:59      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   ar   sp   for   strong   

在项目中先引用Encode.dll  下面是下载地址:

Encode.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>

 


bubuko.com,布布扣

 

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、效果图

bubuko.com,布布扣

 

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

标签:style   blog   http   io   color   ar   sp   for   strong   

原文地址:http://www.cnblogs.com/pingming/p/4082966.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!