Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÚasp.netÖÐ×Ô¶¯¸øurlµØÖ·¼ÓÉϳ¬Á´½Ó

 ÒªÏë×Ô¶¯ÏÔʾ³¬Á´½ÓµÄ¹Ø¼üÔÚÓÚÈçºÎÄÜÕýȷʶ±ð³¬Á´½Ó£¬ºÁÎÞÒÉÎʵģ¬×îÓÐЧµÄ·½·¨ÊÇÓÃÕýÔò±í´ïʽ¡£ÕýÔò±í´ïʽÊÇÓÉÆÕͨ×Ö·û£¨ÀýÈç×Ö·û a µ½ z£©ÒÔ¼°ÌØÊâ×Ö·û£¨³ÆΪԪ×Ö·û£©×é³ÉµÄÎÄ×Öģʽ£¬ÃèÊöÁËÒ»ÖÖ×Ö·û´®Æ¥ÅäµÄģʽ£¬¿ÉÒÔÓÃÀ´¼ì²éÒ»¸ö´®ÊÇ·ñº¬ÓÐijÖÖ×Ó´®¡¢½«Æ¥ÅäµÄ×Ó´®×öÌæ»»»òÕß´Óij¸ö´®ÖÐÈ¡³ö·ûºÏij¸öÌõ¼þµÄ×Ó´®µÈ¡£.net»ù´¡Àà¿âÖаüº¬ÓÐÒ»¸öÃû×Ö¿Õ¼äºÍһϵÁпÉÒÔ³ä·Ö·¢»Ó¹æÔò±í´ïʽÍþÁ¦µÄÀ࣬ÓÃËü¾Í¿ÉÒÔ×Ô¶¯Ì½²â³öÎÄ×ÖÖеÄurlÁ´½Ó»òemailµØÖ·¡£ÏÂÃæÎÒ¾ßÌå½²½²ÈçºÎÓÃasp.net(c#)Ò»²½²½ÊµÏÖÎÒÃǵÄÄ¿µÄ£º
Ê×ÏÈ£¬ÒªÏëÔÚasp.net(c#)ÖÐʹÓÃÕýÔò±í´ïʽ¾Í±ØÐë°Ñ system.text.regularexpressions Õâ¸öÃüÃû¿Õ¼ä°üº¬½øÀ´£º
using system.text.regularexpressions;
µÚ¶þ²½ÊÇÓÃÕýÔò±í´ïʽʶ±ðurl³¬Á´½Ó£º
regex urlregex = new regex(@"(http:\/\/([\w.]+\/@)\s*)",
   regexoptions.ignorecase|regexoptions.compiled);
ÕâÀïµÄ´úÂëÊÇÓÃÕýÔò±í´ïʽʶ±ðemailµØÖ·£º
regex emailregex = new regex(@"([a-za-z_0-9.-]+\@[a-za-z_0-9.-]+\.\w+)",
   regexoptions.ignorecase|regexoptions.compiled);
µÚÈý²½£¬µ±³ÌÐòÒѾ­Ê¶±ð³öurl³¬Á´½Ó»òemailµØÖ·ºó£¬±ØÐëÓÃ<a href=/knowskycom/...>³¬Á´½Ó</a>¶ÔÕâЩ³¬Á´½Ó½øÐÐÌæ»»£¬ÕâÑù²ÅÄÜ°ÑÕâЩÎÄ×ÖÏÔʾΪÁ´½ÓµÄÐÎʽ¡£ÎÒÕâÀï°ÑËüÃÇÈ«²¿°üº¬ÔÚº¯ÊýÖУº
private void button1_click(object sender, system.eventargs e)
{
   string strcontent = inputtextbox.text;
   regex urlregex = new regex(@"(http:\/\/([\w.]+\/@)\s*)",
                    regexoptions.ignorecase| regexoptions.compiled);
   strcontent = urlregex.replace(strcontent,
                "<a href=/knowskycom/\"\" target=\"_blank\"></a>");
   regex emailregex = new regex(@"([a-za-z_0-9.-]+\@[a-za-z_0-9.-]+\.\w+)",
      regexoptions.ignorecase| regexoptions.compiled);
   strcontent = emailregex.replace(strcontent, "mailto:></a>");
   lbcontent.text += "<br&


Ïà¹ØÎĵµ£º

ASP.NETÖеÄHttpWorkerRequest¶ÔÏñ¼°ÆäÓ¦ÓÃ

HttpWorkerRequest¶ÔÏñÔÚASP.Net´¦ÀíÁ÷³ÌÖеÄλÖãº
ÿһ¸öASP.NET³ÌÐòÖ´ÐÐʱ¶¼»á¶Ôµ±Ç°URLµÄÇëÇó½øÐнâÎö£¬±¾ÎĽ«·ÖÎöASP.NETÒ³ÃæÇëÇóµÄÔ­Àí¡£µ±ÎÒÃÇÔÚä¯ÀÀÆ÷ÉÏÊäÈëÒ»¸öURLʱ£¬ Á÷³ÌÈçÏ£º
Ê×Ïȱ»WWW·þÎñÆ÷½Ø»ñ£¨inetinfo.exe½ø³Ì£©£¬ ¸Ã½ø³ÌÊ×ÏÈÅжÏÒ³Ãæºó׺£¬ È»ºó¸ù¾ÝIISÖÐÅäÖþö¶¨µ÷ÓþßÌåµÄÀ©Õ¹³ÌÐò¡£
Èçaspx¾Í»áµ ......

ASP.NETÉú³É¾²Ì¬Ò³Ãæ·½·¨´óÈ«

·½°¸1£º
/// <summary>
/// ´«ÈëURL·µ»ØÍøÒ³µÄhtml´úÂë
/// </summary>
/// <param name="Url">URL</param>
/// <returns></returns>
public static string getUrltoHtml(string Url)
{
errorMsg = "";
try
{
System.Net.WebRequest wReq = System.Net.WebReque ......

asp.net mvcÇ¿´óµÄ·ÖÒ³¿Ø¼þMvcPager


²»¹ÜʹÓÃʲôÀ´¿ª·¢³ÌÐò£¬¶¼ÉÙ²»ÁËÐèÒª×ö·ÖÒ³£¬Ä¿Ç°Ê¹ÓÃasp.net
mvc¿ª·¢µÄwebÓ¦ÓóÌÐòµÄÈËÔ½À´Ô½¶àÁË£¬ÏàÓ¦µÄ¸¨Öú£¬Ìá¸ß¿ª·¢Ð§ÂʵÄhelper·½·¨¡¢¿Ø¼þ¶¼½«»á³öÏÖ¡£½ñÌìÎÒÏò´ó¼Ò½éÉÜÒ»¿îÔÚasp.net
mvc¿ò¼ÜÖÐʹÓõķÖÒ³¿Ø¼þ¡£±¾ÈËÒ²ÊÇÔÚÐÂÄêµÄʱºò³õ´ÎʹÓ㬵«ÊÇһֱûÓÐÍƼö¸ø´ó¼Ò¡£ÀûÓÃÎåÒ»ÐÝϢʱ¼äÒ²¾Í½éÉܸø´ó¼Ò¡£Éùà ......

ASP.NET³ÌÐòÖг£ÓõÄÈýÊ®ÈýÖÖ´úÂë

1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
¡¡¡¡´«ËͲÎÊý£º
response.write("£¼script£¾window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)£¼/script£¾")
¡¡¡¡½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
¡¡¡¡2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1 ......

ÆôÓÃASP.NETÊý¾Ý°ó¶¨¿Ø¼þÀï×ֶεÄÏÔʾ¸ñʽ

ASP.NETÊý¾Ý°ó¶¨¿Ø¼þ(GridView¡¢DataList¡¢DetailsView¡¢FormViewµÈ£©ÀïµÄ×Ö¶ÎÉ趨¸ñʽºó£¬È´²»Æð×÷Óã¬ÏÔʾ»¹ÊÇÔ­À´µÄ¸ñʽ£¬Ã»Óа´É趨ÏÔʾ³öÀ´¡£
ÕâÀïÊÇÒªÉèÖÃ×ֶεÄÒ»¸öÊôÐÔ²ÅÄÜÒªÈÃ×ֶθñʽÆð×÷Ó㬠±ØÐëÈÃÊý¾Ý×ֶεÄHtmlEncodeÊôÐÔΪFalse£¬·ñÔò×Ö¶ÎÊý¾Ý²»»á°´¸ñʽÏÔʾ¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ