. Net simplified to traditional instances, traditional to simplified Encode. dll download,. netencode. dll
In the project, first reference Encode. dll is as follows:
Encode. dll
1. html page code
<% @ Page Language = "C #" AutoEventWireup = "true" CodeBehind = "simplified conversion. aspx. cs "Inherits =" ASP. NET _ language basics. simplified and traditional conversion "%> <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2. backend. cs codeUsing 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 _ language basics {public partial class simplified conversion: 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,
Net Web Page code from simplified to traditional?Private void button#click (object sender, EventArgs e)
{
EncodeRobert edControl = new EncodeRobert (); // creates a simplified conversion object.
TxtResult. Text = edControl. SCTCConvert (ConvertType. Simplified, ConvertType. Traditional, txtSource. Text); // perform Simplified Conversion
}
Write it in the button event, but you need to reference A using EncodeMy; not a class library that comes with. net. Refer to Encode. dll. You can find this online.
Net how to implement simplified and Traditional Chinese conversion? What is its conversion principle?
Download.csdn.net/source/617532 ,. If you need to write it in your project, you can reference Encode. dll in the bin folder.
Using EncodeMy;
EncodeRobert edControl = new EncodeRobert (); // creates a simplified conversion object.
TxtResult. Text = edControl. SCTCConvert (ConvertType. Simplified, ConvertType. Traditional, txtSource. Text); // perform Simplified Conversion