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

BindºÍEvalµÄ²»Í¬Ó÷¨ (asp.net C#)

½ñÌìÔÚÓÃDataListµÄÄ£°åÁеÄʱºòÏ°¹ßÐÔµØÏñÔÚ03ÖÐÄÇÑùÈ¥¸øÄ£°åÁеİó¶¨×ֶμӸö´¦Àíº¯Êý£º
 < asp:Label ID = " Label1 " runat = " server " Text = ' <%#ConvertState(Bind("Status"))%> ' ></ asp:Label >
     ¿ÉÊǾ¹È»³ö´í£ºµ±Ç°ÉÏÏÂÎÄÖв»´æÔÚÃû³Æ“Bind” ¡£    
     ºóÀ´ÓÖÏ°¹ßÐÔµØÏë°Ñ°ó¶¨×ֶ奶ÀÄóöÀ´ÏÔʾ£¬ÓÖÌáʾ£º¾¯¸æ 2 Éè¼ÆÆ÷ÎļþÉú³Éʧ°Ü: ±ØÐ뽫¶Ô Bind µÄµ÷Ó÷ÖÅä¸øÄ£°åÖеĿؼþµÄÊôÐÔ¡£ ¸Ð¾õºÜÓôÃÆ£¬ÓÚÊÇ°ÑBind»»³ÉEvalÒ»µãÎÊÌⶼûÁË¡£
 < asp:Label ID = " Label1 " runat = " server " Text = ' <%#ConvertState(Eval("Status"))%> ' ></ asp:Label >
   ÉÏÍø²éһϲŷ¢ÏÖ¶þÕßµÄÇø±ð£º
eval()·½·¨ÔÚÔËÐÐʱʹÓ÷´ÉäÖ´ÐкóÆڰ󶨼ÆË㣬Òò´ËÓë±ê×¼µÄASP.NETÊý¾Ý°ó¶¨·½·¨bindÏà±È£¬»áµ¼ÖÂÐÔÄÜÃ÷ÏÔϽµ¡£ËüÒ»°ãÓÃÔÚ°ó¶¨Ê±ÐèÒª¸ñʽ»¯×Ö·û´®µÄÇé¿öÏ¡£¶àÊýÇé¿ö¾¡Á¿ÉÙÓô˷½·¨
Eval ·½·¨ÊǾ²Ì¬£¨Ö»¶Á£©·½·¨£¬¸Ã·½·¨²ÉÓÃÊý¾Ý×ֶεÄÖµ×÷Ϊ²ÎÊý²¢½«Æä×÷Ϊ×Ö·û´®·µ»Ø¡£Bind ·½·¨Ö§³Ö¶Á/д¹¦ÄÜ£¬¿ÉÒÔ¼ìË÷Êý¾Ý°ó¶¨¿Ø¼þµÄÖµ²¢½«Èκθü¸ÄÌá½»»ØÊý¾Ý¿â¡£
ʹÓà Eval ·½·¨
Eval ·½·¨¿É¼ÆËãÊý¾Ý°ó¶¨¿Ø¼þ£¨Èç GridView¡¢DetailsView ºÍ FormView ¿Ø¼þ£©µÄÄ£°åÖеĺóÆÚ°ó¶¨Êý¾Ý±í´ïʽ¡£ÔÚÔËÐÐʱ£¬Eval ·½·¨µ÷Óà DataBinder ¶ÔÏóµÄ Eval ·½·¨£¬Í¬Ê±ÒýÓÃÃüÃûÈÝÆ÷µÄµ±Ç°Êý¾ÝÏî¡£ÃüÃûÈÝÆ÷ͨ³£ÊÇ°üº¬ÍêÕû¼Ç¼µÄÊý¾Ý°ó¶¨¿Ø¼þµÄ×îС×é³É²¿·Ö£¬Èç GridView ¿Ø¼þÖеÄÒ»ÐС£Òò´Ë£¬Ö»ÄܶÔÊý¾Ý°ó¶¨¿Ø¼þµÄÄ£°åÄڵİó¶¨Ê¹Óà Eval ·½·¨¡£
Eval ·½·¨ÒÔÊý¾Ý×ֶεÄÃû³Æ×÷Ϊ²ÎÊý£¬´ÓÊý¾ÝÔ´µÄµ±Ç°¼Ç¼·µ»ØÒ»¸ö°üº¬¸Ã×Ö¶ÎÖµµÄ×Ö·û´®¡£¿ÉÒÔÌṩµÚ¶þ¸ö²ÎÊýÀ´Ö¸¶¨·µ»Ø×Ö·û´®µÄ¸ñʽ£¬¸Ã²ÎÊýΪ¿ÉÑ¡²ÎÊý¡£×Ö·û´®¸ñʽ²ÎÊýʹÓÃΪ String ÀàµÄ Format ·½·¨¶¨ÒåµÄÓï·¨¡£
ʹÓà Bind ·½·¨
Bind ·½·¨Óë Eval ·½·¨ÓÐһЩÏàËÆÖ®´¦£¬µ«Ò²´æÔںܴóµÄ²îÒì¡£ËäÈ»¿ÉÒÔÏñʹÓà Eval ·½·¨Ò»ÑùʹÓà Bind ·½·¨À´¼ìË÷Êý¾Ý°ó¶¨×ֶεÄÖµ£¬µ«µ±Êý¾Ý¿ÉÒÔ±»ÐÞ¸Äʱ£¬»¹ÊÇҪʹÓà Bind ·½·¨¡£ 
ÔÚ ASP.NET ÖУ¬Êý¾Ý°ó¶¨¿Ø¼þ£¨Èç GridView¡¢DetailsView ºÍ FormView ¿Ø¼þ£©¿É×Ô¶¯Ê¹ÓÃÊý¾ÝÔ´¿Ø¼þµÄ¸üС¢É¾³ýºÍ²åÈë²Ù×÷¡£ÀýÈ磬Èç¹ûÒÑΪÊý¾ÝÔ´¿Ø¼þ¶¨ÒåÁË SQL Select¡¢Insert¡¢Delete ºÍ Update Óï¾ä£¬Ôòͨ¹ýʹÓà GridView¡¢DetailsView »ò Form


Ïà¹ØÎĵµ£º

¡¾ASP.net¼¼ÇÉ¡¿asp.netµ¯³ö´°¿Ú ·µ»ØÖµ

¸Õ¸Õ ¿´µ½Õâôһ¸öÎÊÌ⣬ÕâÀïÒ²×ö¸ö±ê¼Ç£ºhttp://topic.csdn.net/u/20080411/14/7b0f9da5-0413-4149-91e9-72c3df3018a3.html?seed=327251592
µÚÒ»ÖÖ·½Ê½£º
//ÔÚVisual Studio 2008Öе÷ÊÔͨ¹ý
testPop_Page.aspx:Ö÷Ò³ÃæASPX´úÂë
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  ......

asp.net ÉèÖóö´íÒ³

    <system.web> 
      <!--********³ö´íÒ³µÄÉ趨********-->
    <customErrors mode="On" defaultRedirect="~/Error.htm"> </customErrors> ......

asp.net,c#,vb,vbs,js¸÷¸öÓïÑÔµÄÓÊÏä·¢ËÍÔ´´úÂë

·¢ËͶËÒÔ163ΪÀý
Ò»¡¢asp.net°æ   using System.Web.Mail; //ÃüÃû¿Õ¼äÒýÓà
c#
        MailMessage mail = new MailMessage();
        mail.To = "shadow103@qq.com";  //½ÓÊÜÈ˵ÄÓÊÏä
     & ......

Asp.Net C#ÖÐSession ÈçºÎ´¢´æÈ¡ÐÅÏ¢

ÒòΪ¸Õ¸Õ½Ó´¥C#ÓïÑÔ²»¾Ã,ÓÚÊÇÎÒ°Ñ¿ØÖÆ̨¸øÈÓÁË,ÒòΪÎÒÌÖÑá¿ØÖÆ̨!
¶øÊÂʵÉÏÎÒÖ»¶ÔWinForm¼¼Êõ¸ÐÐËȤ,µ«ÊÂʵÉϵ½ÏÖÔÚÎÒ·¢ÏÖASP.Net C#µÄWeb¼¼ÊõÊÇÈÕÏÔÖØÒªÆðÀ´!
ÓÚÊÇ¿ªÊ¼½Ó´¥,¸Õ¸ÕÆð²½ÓÚËùÖª,ÓÈÆäÊÇһЩ×î¼òµ¥µÄ¶«Î÷,µ½ÍøÉÏËÑË÷Á˺ܾÃ,²»ÊÇÌ«ÂÒ¾ÍÊÇ˵²»Çå³þ!
¾Ù¸öÀý×ÓÀ´Ëµ,¾Í˵SessionºÃÁË,²»ÖªµÀÍøÉϵÄÄÇЩ¼Ò»ïµ½µ×ÔÚ½²Ê ......

ASP.NETÅäÖÃÎļþWeb.config

ÈÏʶASP.NETÅäÖÃÎļþWeb.config
¡¡¡¡Ò»¡¢ÈÏʶWeb.configÎļþ
¡¡¡¡Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢(Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½)£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈ쵀 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ