Asp.NetʹÓÃÕýÔò±í´ïʽ½âÎöÖÐÓ¢ÎÄ»ìÅÅÄÚÈÝ
¸ø³öÒ»¸ö×Ö·û´®£¬Èç¡°ÖйúChinaÎÒ°®ÄãI love you¡±£¬³ÌÐò¿ÉÒÔʵÏÖÖÐÓ¢ÎĵÄÇø±ð;
ʶ±ð½á¹ûÈçÏ£º¹²ËĸöÔªËØ
Öйú
China
ÎÒ°®Äã
I love you
string ptn = "[\u4e00-\u9fa5]+|[a-zA-Z\\s]+";
System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(ptn);
string z = "ÖйúChinaÎÒ°®ÄãI love you";
foreach (Match m in reg.Matches(z))
{
Console.WriteLine(m.Value);
}
Ïà¹ØÎĵµ£º
ASP.NET³ÌÐòÖг£ÓôúÂë»ã×Ü
1.×Ô¶¨ÒåÒì³£´¦Àí
//×Ô¶¨ÒåÒì³£´¦ÀíÀà
using System;
using System.Diagnostics;
namespace MyAppException
{
¡¡/// £¼summary£¾
¡¡/// ´ÓϵͳÒì³£ÀàApplicationException¼Ì³ÐµÄÓ¦ÓóÌÐòÒì³£´¦ÀíÀà¡£
¡¡/// ×Ô¶¯½«Òì³£ÄÚÈݼǼµ½Windows NT/2000µÄÓ¦ÓóÌÐòÈÕÖ¾
¡¡/// £¼/summary£¾
......
»¶Ó½øÈë.NETÉçÇøÂÛ̳£¬Óë200Íò¼¼ÊõÈËÔ±»¥¶¯½»Á÷ >>½øÈë
ASP.NET Êý¾Ý¿Ø¼þ:GridView,DataList,Repeater ,DetailsView,FormView¡£
ASP.NET Êý¾Ý¿Ø¼þ×ÛÊö£º
1.Ç°3¸öÓÃÓÚ³ÊÏÖ¶àÌõ¼Ç¼,ºóÃæ2¸öÓÃÓÚ³ÊÏÖµ¥ÌõÊý¾ÝÃ÷ϸ,¼´³£ÓõļǼÃ÷ϸ¡£
2.GridViewºÍDetailsView¿Ø¼þµÄ²¼¾Ö¹Ì¶¨,×Ô¶¨ÒåÊý¾ÝÏÔʾµÄ²¼¾Ö¹¦ÄÜÓÐÏÞ,Ò»°ã ......
1.ÉÏ´«¹¦ÄÜ
JS¼ì²é
function hideUpImg()//¹Ø±Õ²ã£¬²¢ÉÏ´«Í¼Æ¬
{
var v=document.getElementById("upImg").value;
var after=v.substring(v.lastIndexOf('.')).toLowerCase();
alert(after);
if(v.length<=0)
{
alert("ÇëÑ¡ÔñͼƬ");
return ......
£¨1£©Ê×ÏÈÒª¶ÔÄÚÈݵÄÌØÊâ×Ö·û½øÐйýÂÇ£º
C# ´úÂ룺
public string res(string partno)
{
partno = partno.Replace("&", "");
partno = partno.Replace("/", "");
partno = partno.Replace("&", "");
return partno;
}
£¨2£©´ÓÊý¾Ý¿âÖлñµÃÒªÉú³ÉµØͼµÄÄÚ ......
Ò».Literal Web ·þÎñÆ÷¿Ø¼þ¸ÅÊö£¨ÕªÓÚMSDN£©
¿ÉÒÔʹÓà Literal Web ·þÎñÆ÷¿Ø¼þ×÷ΪҳÃæÉÏÆäËûÄÚÈݵÄÈÝÆ÷¡£Literal ×î³£ÓÃÓÚÏòÒ³ÃæÖж¯Ì¬Ìí¼ÓÄÚÈÝ¡£
Literal ¿Ø¼þ±íʾÓÃÓÚÏòÒ³ÃæÌí¼ÓÄÚÈݵļ¸¸öÑ¡ÏîÖ®Ò»¡£¶ÔÓÚ¾²Ì¬ÄÚÈÝ£¬ÎÞÐèʹÓÃÈÝÆ÷£¬¿ÉÒÔ½«±ê¼Ç×÷Ϊ HTML
Ö±½ÓÌí¼Óµ½Ò³ÃæÖС£µ«ÊÇ£¬Èç¹ûÒª¶¯Ì¬Ìí¼ÓÄÚÈÝ£¬Ôò±ØÐ뽫ÄÚÈÝÌí¼ ......