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

ASP.NET 4.0µÄÆß´óÐÂÌØÐÔÖ®"¿Ø¼þµÄClientIDMode"


 ÔÚÔçÆÚµÄASP.NET¿ò¼ÜÖУ¬Èç¹ûÄã·ÅÖÃÒ»¸ö¿Ø¼þÔÚÒ»¸öÈÝÆ÷ÖУ¬ÈçGridViewÄ£°åÁС¢µÇ¼ģ°å¡¢ÆäËü£¬ÔÚÔËÐÐʱÕâЩ¿Ø¼þµÄID½«±»Ìæ»»ÓÉASP.NET×ÔÉí²úÉúµÄËæ»úΨһID¡£
      
      Ϊ¿ª·¢ÕßÌṩ·þÎñ·½·ÃÎʿؼþµÄPage.FindControl("controlid")ÒÔ¼°JavaScriptÖÐʹÓà µÄdocument.getElementById("controlid")£¬ÕâÊÇÒ»¸öÓÉÀ´ÒѾõÄÎÊÌâ¡£¼òµ¥À´ËµÔËÐÐʱÉú³ÉµÄ¿Ø¼þID²¢²»ÊÇ¿ÉÔ¤¼ûµÄ¡£
       
  µ«.NET¿ª·¢Õß²»¾Ã½«»áûÓÐÕâÑùµÄÀ§ÈÅ£¬µ«ÊÇ¡£ÒòΪÔÚASP.NET 4.0ÖÐËùÓпؼþÓÐÒ»¸öÊôÐÔClientIDMode¡£ÕâÌṩÁËÁ¼ºÃµÄ¿ØÖÆÉú³ÉµÄIDµÄÄÚÈÝ¿ØÖÆÔÚÔËÐÐʱ¡£
¶ÔClientIDModes¿ÉÓõÄÀàÐÍÓУº
×Ô¶¯Ê¶±ð(AutoID) -ÕâÊÇÏàͬµÄËæ»ú·½Ê½£¬ÒòΪËü·¢ÉúÔÚʹÓÃASP.NETµÄÔçÆÚ°æ±¾¡£
¾²Ì¬(Static) -¿Ø¼þµÄID½«²»»á¸Ä±äÔÚÔËÐÐʱ¡£ÕâÊǷdz£·½±ãµÄÉèÖÃÈç¹û±»¿ØÖÆÔÚÍøÒ³ÉÏʹÓõÄÈÝÆ÷»òÐèÒªÔÚ¿Í»§¶Ë½Å±¾·ÃÎÊ¡£
¿ÉÔ¤²âµÄ£¨Predictable£© Ä£Ê½-¾²Ì¬Ä£°åÏñÒ»¸öTextBox¿Ø¼þÔÚGridView²»»áÓÐÓã¬ÒòΪGridViewµÄÐеÄÖظ´¡£ÔÚÕâÖÖÇé¿öÏ¿ÉÔ¤²âµÄģʽֵÊÇÔÚ·½±ãµÄµØ·½£¬¿ª·¢Õß¿ÉÒÔÌṩһ¸ö¿ÉÔ¤²âClientIDRowSuffixÊôÐÔµÄÖ÷¼üµÄGridViewRowʹÓ᣿ÉÒÔÔ¤¼û£¬Õ⽫׷¼Óºó׺£¬ÒÔ¶ÀÌصļÛÖµ×÷Ϊʵ¼Ê¿ØÖƵÄID¡£ÀýÈ磬Èç¹ûʵ¼Ê¿ØÖÆTemplateColumn¿Ø¼þIDÔÚÊÇtxtBoxºÍClientIDRowSuffixÊÇGridViewRowIndexÎı¾¿òµÄIDʶ±ðÂ룬ȻºóÔÚÔËÐÐʱ²úÉúµÄrow1½«GridView1_txtBox_1ÉÏ£¬Îªrow2½«GridView1_txtBox_2µÈ¡£
¼Ì³Ð£¨Inherit £© -Õ⽫¼Ì³Ð¸¸¿Ø¼þClientIDModeÖµµÄ¡£
ÔÚÖ¸¶¨µÄÒ³Ã漶±ðÉÏ£¬Äã²»±ØΪÿ¸ö¿Ø¼þÌṩClientIDMode¡£
<%@ Master Language="C#" ClientIDMode="Predictable" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="MyWebApplication.SiteMaster" %>
Or it could also be provided at the application level using the web.config specification as shown below.
<system.web>
     <pages clientIDMode="Predictable"></pages>
</system.web>
Çë×¢Ò⣬ClientIDModeÔÚ¿ØÖƲ㽫¸²¸ÇÔÚÒ³ÃæÖ¸ÁîºÍweb.configÉÏÊöÉèÖÃÖÐÖ¸¶¨¡£
Ô­ÎÄת×Ô£ºhttp://www.systhinker.com/html/24/n-10324.html


Ïà¹ØÎĵµ£º

asp.net ·ÖÒ³

///·½·¨
 public static List<FeesItemInfo> selectAll()
        {
            List<FeesItemInfo> list = new List<FeesItemInfo>();
         & ......

ASP.NETÖнøÐÐÏûÏ¢´¦Àí(MSMQ) Ò»

ASP.NETÖнøÐÐÏûÏ¢´¦Àí(MSMQ) Ò»
      MSMQÊÇ΢ÈíÏûÏ¢¶ÓÁеÄÓ¢ÎÄËõд¡£ÄÇôʲôÊÇÏûÏ¢¶ÓÁУ¿ÕâЩ½éÉÜÍøÉÏÒ»´óƬÕâÀï¾Í²»¶à˵ÁË¡£±¾ÎĶÔÓÚ´óϺ¼¶µÄÈËÎïÀ´ËµÕâÖ»ÊÇСÍæÒâ¶øÒÑ£¬¶ÔÓÚ³õѧÕßÀ´ËµÕâÎÄÕ»¹ÊÇÓÐÒ»¶¨µÄ°ïÖú£¬Ï£Íû·¹ýµÄ´óϺÃDZðЦ»°ÎÒ°àÃÅŪ¸«¡£
Ò»¡¢MSMQ½éÉܺͰ²×°ÏûÏ¢¶ÓÁÐ
 &nb ......

asp.net Îļþ¼Ð²Ù×÷£¨´´½¨£¬É¾³ý£¬±éÀú)

Ò»¡¢´´½¨Îļþ¼Ð
#region ´´½¨Îļþ¼Ð
    /// <summary>
    /// Self_Function:´´½¨Îļþ¼Ð
    /// </summary>
    /// <param name="path">´´½¨Îļþ¼ÐµÄ·¾¶</param>
    /// <param name="noyes">Òþ²ØÎ ......

asp.net ÉÏ´«Îļþ

  if (FileUpload1.HasFile)
            {
                string fileContentType = FileUpload1.PostedFile.ContentType;
       &n ......

asp.net Ò³ÃæÌí¼ÓFlash

        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
    <param name="movie" value="<%= ResolveUr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ