Refer to Encode.dll in the project first:
Encode.dll
1. HTML page code
<%@ Page Language="C #"AutoEventWireup="true"codebehind="simple and complex conversion. Aspx.cs"Inherits="asp.net_ Language Foundation. Simple and complex conversion" %><!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Headrunat= "Server"> <title></title></Head><Body> <formID= "Form1"runat= "Server"> <Div> <Asp:textboxID= "Txtjian"TextMode= "MultiLine"Width= "500px"Height= "200px"runat= "Server"></Asp:textbox><BR/> <Asp:buttonID= "Btnjtof"runat= "Server"Text= "Simplified to traditional"onclick= "Btnjtof_click" /> <Asp:buttonID= "Btnftoj"runat= "Server"Text= "Traditional to Simplified"onclick= "Btnftoj_click" /> <BR/> <Asp:textboxID= "Txtfan"TextMode= "MultiLine"Width= "500px"Height= "200px"runat= "Server"></Asp:textbox> </Div> </form></Body></HTML>
2, backstage. CS Code
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingsystem.web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingEncodemy;namespaceasp.net_ Language Foundation { Public Partial classSimple and complex conversion: System.Web.UI.Page {protected voidPage_Load (Objectsender, EventArgs e) { } protected voidBtnjtof_click (Objectsender, EventArgs e) {Encoderobert er=NewEncoderobert (); Txtfan. Text=er. Sctcconvert (converttype.simplified, converttype.traditional, Txtjian. Text); } protected voidBtnftoj_click (Objectsender, EventArgs e) {Encoderobert er=NewEncoderobert (); Txtfan. Text=er. Sctcconvert (converttype.traditional, converttype.simplified, Txtjian. Text); } }}
3.
. NET simplified conversion Traditional instance, traditional conversion simplified Encode.dll download