Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : asp.net

ASP.NETÖеÄEval£¨£©ºÍDataBinder.Eval£¨£©·½·¨

ASP.NETÖеÄEval£¨£©ºÍDataBinder.Eval£¨£©·½·¨
2009-12-12 17:55
Eval( " ")ºÍBind( " ")¡¡ÕâÁ½ÖÖÒ»¸öµ¥Ïò°ó¶¨£¬Ò»¸öË«Ïò°ó¶¨
bindÊÇË«Ïò°ó¶¨,µ«ÐèÊý¾ÝÔ´¿É¸ü¸Ä²ÅÄÜÓÃ
ASP.NET 2.0¸ÄÉÆÁËÄ£°åÖеÄÊý¾Ý°ó¶¨²Ù×÷£¬°Ñv1.xÖеÄÊý¾Ý°ó¶¨Óï·¨DataBinder.Eval(Container.DataItem, fieldname)¼ò»¯ÎªEval(fieldname)¡£Eval·½·¨ÓëDataBinder.EvalÒ»Ñù¿ÉÒÔ½ÓÊÜÒ»¸ö¿ÉÑ¡µÄ¸ñʽ»¯×Ö·û´®²ÎÊý¡£Ëõ¶ÌµÄEvalÓï·¨ÓëDataBinder.EvalµÄ²»Í¬µãÔÚÓÚ£¬Eval»á¸ù¾Ý×î½üµÄÈÝÆ÷¶ÔÏó£¨ÀýÈçDataListItem£©µÄDataItemÊôÐÔÀ´×Ô¶¯µØ½âÎö×ֶΣ¬¶øDataBinder.EvalÐèҪʹÓòÎÊýÀ´Ö¸¶¨ÈÝÆ÷¡£ÓÉÓÚÕâ¸öÔ­Òò£¬EvalÖ»ÄÜÔÚÊý¾Ý°ó¶¨¿Ø¼þµÄÄ£°åÖÐʹÓ㬶ø²»ÄÜÓÃÓÚPage£¨Ò³Ã棩²ã¡£µ±È»£¬ASP.NET 2.0Ò³ÃæÖÐÈÔȻ֧³ÖDataBinder.Eval£¬Äã¿ÉÒÔÔÚ²»Ö§³Ö¼ò»¯µÄEvalÓï·¨µÄ»·¾³ÖÐʹÓÃËü¡£ ÏÂÃæµÄÀý×ÓÑÝʾÁËÈçºÎʹÓÃеļò»¯µÄEvalÊý¾Ý°ó¶¨Óï·¨°ó¶¨µ½DataListÊý¾ÝÏîÄ£°å£¨ItemTemplate£©ÖеÄImage¡¢LabelºÍHyperLink¿Ø¼þ¡£ £¼asp:DataList ID= "DataList1 " RepeatColumns= "5 " Width= "600 " runat= "server " DataSourceID= "ObjectDataSource1 "£¾ ¡¡£¼ItemTemplate£¾ ¡¡¡¡£¼asp:HyperLink ID= "HyperLink1 " runat= "se ......

ÅäÖÃASP.NET AJAX

ÏÈÏÂÔØ.net framework2.0ºÍASPAJAXExtSetup.msi
È»ºó°²×° ¼´¿ÉÔËÐÐ
Èç¹ûÐèÒª¿ª·¢AJAX
ÔòÒª°²×°VSºÍAjaxControlToolkit
ÔÚVS¹¤¾ßÏäÖÐн¨±êÇ© ....
.Net Framework 3.5 »·¾³ÏÂÇëÔĶÁ v3.5 »·¾³ÏÂÈçºÎ²¼Öà AJAX »·¾³¡£
ÕâÀïËù˵µÄ»·¾³ÊÇÖ¸°´·þÎñÆ÷¶ËʵÏÖ·½Ê½½øÐеÄÅäÖá£Ó¦¸Ã˵ֻҪ°²×°ÁË ASP.NET AJAX Extensions ¾Í¿ÉÒÔʵÏÖÒ»µã Ajax ÁË£¬µ«ÊÇÒªÏëÀûÓà AJAX µÄ¸ü¶à¿Ø¼þ£¬ÎÒÃÇÒ»°ã¶¼»¹ÏÂÔØÁË ASP.NET AJAX Control Toolkit¡£
Ê×ÏÈ£¬ÎÒÃÇÓ¦¸ÃÅäÖÃASP.NET AJAX ÔËÐÐÓ뿪·¢»·¾³¡£
È»ºó£¬µ½ ASP.NET AJAX ¹Ù·½ÍøÕ¾ÏÂÔØ ASP.NET 2.0 AJAX Extensions 1.0 £¨±¾µØÏÂÔØ£©ºÍ ASP.NET AJAX Control Toolkit£¬ÕâÁ½¸öÎļþ¶¼²»´ó£¬×ܹ²Ò²Ö»Óм¸Õס£
°²×° ASP.NET 2.0 AJAX Extensions 1.0£¬ÔÙ°²×° ASP.NET AJAX Control Toolkit¡£ASP.NET 2.0 AJAX Extensions 1.0 °²×°ºÜ¼òµ¥¾Í²»½éÉÜÁË£¬¹ØÓÚ ASP.NET AJAX Control Toolkit µÄ°²×°Çë²Î¼û°²×° AJAX Control Toolkit¡£
ÅäÖÃASP.NET AJAX¡£
˵Ã÷
¡ôÈôÖ»×÷ÔËÐл·¾³²»×÷¿ª·¢»·¾³£¬¿ÉÒÔ²»°² ASP.NET AJAX Control Toolkit¡£
¡ôÅäÖÃÍê³Éºó¿ÉÄÜÐèÒªÖØÐÂÆô¶¯ IIS¡£
1>°²×°Ajax ASPAJAXExtSetup.msi £¨ÔÚhttp://ajax.asp.netÏÂÔØ£©
......

ASP.NETÖÐÑéÖ¤¿Ø¼þµÄʹÓÃ


Ç°ÑÔ£º
    Ç°¼¸ÈÕ£¬ÎÞÄÎÓÃJSÅжϿؼþµÄÓÐЧÐÔ£¬·¢ÏÖµÄÈ·ÊÇÒ»¼þ·ÑÁ¦¡¢·ÑÉñµÄÊÂÇ飡ÌرðÊÇÕë¶ÔÓʼþ¸ñʽ¡¢ÓÊÕþ±àÂëµÈµÄ¹ØÓÚÕýÔò±í´ïʽµÄJSÑéÖ¤£¨ÆäÖÐÉæ¼°ÕýÔò±í´ïʽµÄ±È½ÏµÈ£¬½Ï·³~£©¡£Æäʵ¶ÔÓÚÕâЩ³£ÓõĿؼþÓÐЧÐÔÑéÖ¤£¬ÔÚAsp.NetÖÐÓе¥¶ÀµÄÑéÖ¤¿Ø¼þ¿É¹©Ê¹Óá£ËûÃÇ¿ÉÒÔÂú×ãÒ»°ãµÄ£¬ÖîÈç·Ç¿Õ£¬·¶Î§¡¢±È½ÏµÈµÄÑéÖ¤¡£
ÑéÖ¤¿Ø¼þ£º
   Asp.NetÖÐÄÚÖõÄÑéÖ¤¿Ø¼þÓУºRequiredFieldValidation¡¢RangeValidation¡¢RegularExpressValidation¡¢CompareValidation¡¢CustomValidationºÍValidationSummaryµÈÁùÖÖ¡£ÆäÖÐÓû§×Ô¶¨ÒåÑéÖ¤¿Ø¼þ£¬ÓÉÓÚ²¢²»·Ç³£³£Óã¨Òª×Ô¶¨ÒåºÜ¶à³É·Ö£¬°üÀ¨º¯ÊýµÈ£©£¬ÔÚ´ËÎIJ»ÓèÂÛÊö¡£
   ¼òµ¥µÄÑéÖ¤½çÃæÈçÏ£¨DesignÊÓͼ£©£º
 
 ÈçͼչʾÁËÑ¡È¡»·¾³£¬ÓұߺìÉ«×ÖÌåΪÑéÖ¤¿Ø¼þµÄErrorMessageÐÅÏ¢¡£Éè¼ÆµÄ»·¾³²¼ÖÃÈçÏ£º
1£© RequiredFieldValidation¿Ø¼þ£¬ÆäControlToValidateÊôÐÔΪÐÕÃû¶ÔÓ¦Îı¾¿ò¡£¶ÔÓÚControlToValidateÊôÐÔ£¬Ã¿Ò»¸öÑéÖ¤¿Ø¼þ¾ù¶ÔÓ¦Ò»¸ö£¬×÷ΪÑéÖ¤µÄÖ÷Ì壻
2£©RangeValidation¿Ø¼þ£¬ ÆäControlToValidateÊôÐÔΪÄêÁä¶ÔÓ¦Îı¾¿ò£»
3£© CompareValidation¿Ø¼þ£¬ ÆäControlToValidateÊôÐÔΪÃÜÂëÈ·È ......

ÔÚasp.net 2.0ÖÐʹÓÃWebParts£¨×ªÔØ£©


WebPartManager
WebPartManager¿Ø¼þÊÇ Web ²¿¼þ¿Ø¼þ¼¯µÄºËÐĿؼþ£¬ÓÃÓÚ¹ÜÀíËùÓÐ Web ²¿¼þ¿Ø¼þ¡¢Web ²¿¼þ¹¦ÄÜºÍ Web ²¿¼þʼþ¡£
±ØÐëÏòʹÓà Web ²¿¼þ¿Ø¼þµÄÿ¸öÒ³Ìí¼ÓÒ»¸ö£¨½ö½öÒ»¸ö£©WebPartManager¿Ø¼þ¡£WebPartManager¿Ø¼þÖ»ÄÜÓÉͨ¹ýÉí·ÝÑéÖ¤µÄÓû§Ê¹Óá£
WebPartManger ÈÎÎñ
ϱíÁгöÁËÓÉ WebPartManager¿Ø¼þÖ´ÐеÄÈÎÎñ¡£
ÈÎÎñ
¿Ø¼þ¹¦ÄÜ
¹ÜÀí Web ²¿¼þ¿Ø¼þ
¹ÜÀíÒ³ÉÏÌṩ Web ²¿¼þ¹¦ÄܵĿؼþ£¬°üÀ¨ WebPart ¿Ø¼þ¡¢Á¬½Ó¿Ø¼þ¡¢ÇøÓò¿Ø¼þ¼°ÆäËû¿Ø¼þ¡£
Ìí¼ÓºÍÒƳý Web ²¿¼þ¿Ø¼þ
ÌṩÔÚÒ³ÉÏÌí¼Ó¡¢É¾³ýºÍ¹Ø±Õ WebPart¿Ø¼þµÄ·½·¨¡£
¹ÜÀíÁ¬½Ó
Ìí¼ÓºÍÒƳý¿Ø¼þÖ®¼äµÄÁ¬½Ó¡£¼àÊÓÁ¬½ÓÒÔ²éÕÒÎÊÌâ¡£
¶Ô¿Ø¼þºÍÒ³½øÐиöÐÔ»¯ÉèÖÃ
ʹÓû§¿ÉÒÔ½«¿Ø¼þÒƵ½Ò³ÉÏ£¬²¢Æô¶¯Óû§¿ÉÒÔÔÚÆäÖб༭¿Ø¼þµÄÍâ¹Û¡¢ÊôÐÔºÍÐÐΪµÄÊÓͼ¡£Î¬»¤Ã¿Ò»Ò³ÉϵÄÓû§Ìض¨µÄ¸öÐÔ»¯ÉèÖá£
ÔÚÒ³ÃæÊÓͼ֮¼äÇл»
ÔÚÒ³ÃæÊÓͼ֮¼äÇл»£¬Ê¹Óû§Äܹ»Ö´ÐÐÈÎÎñ£¬ÀýÈç¸ü¸ÄÒ³Ãæ²¼¾Ö»ò±à¼­¿Ø¼þ¡£
Òý·¢ Web ²¿¼þÉúÃüÖÜÆÚʼþ
¶¨Òå²¢Òý·¢ Web ²¿¼þ¿Ø¼þµÄÉúÃüÖÜÆÚʼþ£¬ÀýÈçÔÚÌí¼Ó¡¢Òƶ¯¡¢Á¬½Ó»òɾ³ý¿Ø¼þʱµÄʼþ¡£
ÆôÓÿؼþµÄµ¼ÈëºÍµ¼³ö
µ¼³ö°üº¬ WebPart¿Ø¼þÊôÐÔµÄ״̬µÄ XML Á÷£¬²¢ÔÊÐíÓû§µ¼ÈëÎļþÒÔ±ã¶ÔÆäËûÒ³»òÕ¾ ......

ASP.NET¸ßÊÖÀ´¿´Ï°¡

ÎÒÏë×öÒ»¸ö¶àÖ¸±ê¶¯Ì¬²éѯ£¬ÇëÎÊÄÄλÐÖµÜ×ö¹ý£¬°ï¸ö棡¾ßÌåÒªÇóÊÇ:ÎÒ¿ÉÒÔËæÒâÑ¡ÔñÊý¾Ý¿â±íÖеÄÈκÎÒ»¸ö»ò¶à¸ö×ֶΣ¬È»ºó°ÑËûÃDzéѯ³öÀ´£¡ÎÒ»á×öµ¥Ö¸±í²éѯµÄ£¬µ«ÏÖÔÚ¹¦ÄÜÒªÒªÇó¶àÖ¸±ê¶¯Ì¬²éѯ£¡»áµÄ°ï¸öæ°¡@£¡¸Ðл֮ÖÁ£¡
ÀýÈçÎÒÏë²éÊý¾Ý¿â±íÖеĠ Óû§±àºÅ ÐÕÃû »òÕßÓû§±àºÅ ÐÕÃû Ê¡·Ý  ÊÕÈë  ²¢°Ñ¶ÔÓ¦µÄ±íÖÐÐÅÏ¢²éѯ³öÀ´£¡ ......

ASP.NET+JQueryʵÏÖAJAXµÄ·ÖÒ³

  AJAXµÄ·ÖÒ³£¬ÊµÏÖ˼·ÊÇ£º
¡¡¡¡1.ÀûÓÃ$.fn.extendÔÚJQuery¿ò¼ÜÏÂÀ©Õ¹pagerÀà
¡¡¡¡2.½«»ñÈ¡¼Ç¼×ÜÊýÓëÏàÓ¦Ò³¼Ç¼µÄºǫ́·½·¨£¬Ð´Ôڼ̳Ð×ÔIHttpHandlerÀàµÄHandler.ashx.csÀ࣬µ±È»Êµ¼ÊÉÏÓÃaspx.csÎļþдºǫ́·½·¨Ò²Ã»ÎÊÌ⣬µ«ÓÉÓÚ.ashx.csÎļþÎÞÐè´¦ÀíÒ³ÃæÖî¶àʼþÒò¶øЧÂʸü¸ß¡£
¡¡¡¡3.ÔÚ³ÊÏÖÒ³ÃæÉϼÓÔØpagerÀà
¡¡¡¡ÒÔÏÂÊÇʵÏֵĴúÂ룺
1.À©Õ¹pagerÀà:extend.js
      (function($){ $.fn.extend({ pager: function(totalCount,options) { var opts = jQuery.extend({ pageSize:10, callback:function(){} }, options); return this.each(function(){ var panel = $(this); function pageCount(){ return Math.ceil(totalCount/opts.pageSize); } function selectPage(type){ return function(){ var page = parseInt($('#currentPage').val()); if(type=='first') $('#currentPage').val('1'); ......

ASP.NET+JQueryʵÏÖAJAXµÄ·ÖÒ³

  AJAXµÄ·ÖÒ³£¬ÊµÏÖ˼·ÊÇ£º
¡¡¡¡1.ÀûÓÃ$.fn.extendÔÚJQuery¿ò¼ÜÏÂÀ©Õ¹pagerÀà
¡¡¡¡2.½«»ñÈ¡¼Ç¼×ÜÊýÓëÏàÓ¦Ò³¼Ç¼µÄºǫ́·½·¨£¬Ð´Ôڼ̳Ð×ÔIHttpHandlerÀàµÄHandler.ashx.csÀ࣬µ±È»Êµ¼ÊÉÏÓÃaspx.csÎļþдºǫ́·½·¨Ò²Ã»ÎÊÌ⣬µ«ÓÉÓÚ.ashx.csÎļþÎÞÐè´¦ÀíÒ³ÃæÖî¶àʼþÒò¶øЧÂʸü¸ß¡£
¡¡¡¡3.ÔÚ³ÊÏÖÒ³ÃæÉϼÓÔØpagerÀà
¡¡¡¡ÒÔÏÂÊÇʵÏֵĴúÂ룺
1.À©Õ¹pagerÀà:extend.js
      (function($){ $.fn.extend({ pager: function(totalCount,options) { var opts = jQuery.extend({ pageSize:10, callback:function(){} }, options); return this.each(function(){ var panel = $(this); function pageCount(){ return Math.ceil(totalCount/opts.pageSize); } function selectPage(type){ return function(){ var page = parseInt($('#currentPage').val()); if(type=='first') $('#currentPage').val('1'); ......
×ܼǼÊý:2672; ×ÜÒ³Êý:446; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [6] [7] [8] [9] 10 [11] [12] [13] [14] [15]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ