asp.net ½«ÖÐÎÄ·Òë³ÉÆ´Òô£¨VS2008£©
3¸öÎļþ
code ÀàÎļþ
using System;
using System.Text;
namespace ConcreteMIS.Common.Chinese
{
/// <summary>
/// ºº×ÖÆ´ÒôÉùĸ¼ÆËãÀà
/// Write by WangZhenlong at 2003/11/29
/// </summary>
public class ChineseConvertor
{
private ChineseConvertor() { }
/// <summary>
/// »ñȡһ´®ºº×ֵį´ÒôÉùĸ
/// </summary>
/// <param name="chinese">Unicode¸ñʽµÄºº×Ö×Ö·û´®</param>
/// <returns>Æ´ÒôÉùĸ×Ö·û´®</returns>
/// <example>
/// “ÐÂÇÅÈí¼þ”ת»»Îª“xqrj”
/// </example>
public static String Convert(String chinese)
{
char[] buffer = new char[chinese.Length];
for (int i = 0; i < chinese.Length; i++)
{
buffer[i] = Convert(chinese[i]);
}
return new String(buffer);
}
/// <summary>
/// »ñȡһ¸öºº×ֵį´ÒôÉùĸ
 
Ïà¹ØÎĵµ£º
ASP.NET »º´æ£º·½·¨ºÍ×î¼Ñʵ¼ù
2009-11-28 16:49
ÕªÒª£ºASP.NET ÌṩÈýÖÖÖ÷ÒªÐÎʽµÄ»º´æ£ºÒ³Ãæ¼¶Êä³ö»º´æ¡¢Óû§¿Ø¼þ¼¶Êä³ö»º´æ£¨»ò³ÆÎªÆ¬¶Î»º´æ£©ºÍ»º´æ API¡£Êä³ö»º´æºÍƬ¶Î»º´æµÄÓŵãÊǷdz£Ò×ÓÚʵÏÖ£¬ÔÚ´ó¶àÊýÇé¿öÏ£¬Ê¹ÓÃÕâÁ½ÖÖ»º´æ¾Í×ã¹»ÁË¡£¶ø»º´æ API ÔòÌṩÁ˶îÍâµÄÁé»îÐÔ£¨Êµ¼ÊÉÏÊÇÏ൱´óµÄÁé»îÐÔ£©£¬¿ÉÓÃÓÚÔÚÓ¦Ó ......
asp.netĬÈϵıàÂëÊÇUTF-8
jsÎļþÀïµÄ±àÂëÒ²ÊÇUTF-8
µ±ÄãÒªÔÚaspxÒ³ÃæÉϽøÐд«ÖÐÎIJÎÊýʱ»á³öÏÖÂÒÂë
<-----request.aspx--½ÓÊÕ²ÎÊýÒ³----->
<----response.aspx--´«ËͲÎÊýÒ³----->
ÀýÒ»£º<a href="request.aspx?str=ÖйúÈË"></a>
½â¾ö°ì·¨Ò»£º
1.¿ÉÒԺ͸ÄwebconfigµÄ±àÂë È磺
  ......
Õ⼸ÌìÅöµ½¸öºÜÆæ¹ÖµÄÎÊÌ⣬ƽ³£ÔÚÏîÄ¿Öдӹ¤¾ßÏäÖУ¬°Ñ¿Ø¼þÍϵ½±à¼Çø£¬ÄÇÊÇÔÙ¼òµ¥ÈÝÒײ»¹ýÁË¡£
¿ÉÊǼ¸ÌìǰÅöµ½¾ÍÊÇ£¬ÎÞÂÛÄãÔõôÍÏ£¬¶¼ÎÞ·¨Íϵ½±à¼ÇøÖУ¬Çл»µ½Ô´Â룬ÔÙÍϵÄʱºòÊÇ¿ÉÒԵ쬲úÉúÁËHTML´úÂë
£¬ÔÙ½«ËüתÊÓͼµÄʱºò£¬·¢ÏÖÎÞ ·¨Õý³£ÏÔʾ¿Ø¼þ£¬£¬ËµÊÇÎÞ·¨ÕÒµ½¸ÃÒ³Ãæ¡£¡£¡£¡£¡£
н¨Á˼¸´ÎÒ²ÊDz»ÐУ¬ÒÔΪÊÇVS³ ......
Ê×ÏÈÃèÊöÒ»ÏÂÎÊÌâ:ÒòΪ¿Í»§µÄÐèÒª,°ÑËùÓжÔÓÚÊý¾Ý¿âµÄ²Ù×÷×ö³ÉÁË´æ´¢¹ý³Ì,ͬʱҲ´æÔÚ´øÓÐÊäÈë²ÎÊýµÄ´æ´¢¹ý³Ì.¿Í»§ÒªÇó½«ËùÓеÄÐÅÏ¢¶¼¿ÉÒÔÓÃË®¾§±¨±íÏÔʾ.ÎÒÃǶ¼ÖªµÀ,ҪʹÓÃË®¾§±¨±íÎÒÃǾÍҪʹÓÃÊý¾ÝÔ´µÄ.ÔÚÕâÀï,ÎÒÃÇʹÓõÄÊý¾ÝÔ´×ÔÈ»¶øÈ»Ò²¾ÍÊÇ´æ´¢¹ý³ÌÁË.µ±È»,ÎÒÃÇÒ²ÊÇÖªµÀµÄ,ÔÚADO.NETµÄÁ¬½ÓģʽÏÂ,Òª¸øË®¾§±¨±íÉèÖÃÊý¾ÝÔ ......
ASP.NETÒ³Ãæ»º´æµÄ¼¸µãÌå»á
¾¡¹Ü±¾ÎĵÄ×÷ÕßдµÄºÜ¼òµ¥£¬µ«ÊÇÏàÐÅͨ¹ýÕâЩÎÄ×Ö£¬»¹ÊÇÄܶԴó¼ÒÁ˽âASP.NETÒ³Ãæ»º´æÓкܴóµÄ°ïÖú¡£
ǰ¼¸ÌìÓöµ½¸öÎÊÌ⣬°Ù˼²»µÃÆä½â¡£ºóÀ´²éÔÄÁËһЩ×ÊÁÏÐÄÀï²ÅÓÐÁ˵ã˼·¡£°Ñ×Ô¼ºÓöµ½µÄÎÊÌâ¼Ç¼ÏÂÀ´Ï£ÍûÄܸøÆäËûµÄÔ°ÓÑһЩ°ïÖú°É¡£
ÊÂÇéÊÇÕâÑùµÄ¡£ÎÒµÄÒ»¸öASP.NETÒ³ÃæÓÃwindow.openµ¼º½ºó ......