ASP.NETÊý¾Ý°ó¶¨¸ÅÊöºÍÓï·¨
Êý¾Ý°ó¶¨¸ÅÊöºÍÓï·¨
ASP.NET ÒýÈëÁËеÄÉùÃ÷ÐÔÊý¾Ý°ó¶¨Óï·¨¡£ÕâÖַdz£Áé»îµÄÓï·¨ÔÊÐí¿ª·¢ÈËÔ±²»½ö¿ÉÒ԰󶨵½Êý¾ÝÔ´£¬¶øÇÒ¿ÉÒ԰󶨵½¼òµ¥ÊôÐÔ¡¢¼¯ºÏ¡¢±í´ïʽÉõÖÁÊÇ´Ó·½·¨µ÷Ó÷µ»ØµÄ½á¹û¡£Ï±íÏÔʾÁËÐÂÓï·¨µÄһЩʾÀý¡£
¼òµ¥ÊôÐÔ Customer: <%# custID %>
¼¯ºÏ Orders: <asp:ListBox id="List1" datasource='<%# myArray %>' runat="server">
±í´ïʽ Contact: <%# ( customer.First Name + " " + customer.LastName ) %>
·½·¨½á¹û Outstanding Balance: <%# GetBalance(custID) %>
¾¡¹Ü¸ÃÓï·¨¿´ÆðÀ´Óë ASP µÄ Response.Write ¿ì½Ý·½Ê½ <%= %> ÏàËÆ£¬µ«ÆäÐÐΪÍêÈ«²»Í¬¡£ASP Response.Write ¿ì½Ý·½Ê½Óï·¨ÔÚ´¦Àíҳʱ¼ÆË㣬¶ø ASP.NET Êý¾Ý°ó¶¨Óï·¨½öÔÚµ÷Óà DataBind ·½·¨Ê±¼ÆËã¡£
DataBind ÊÇÒ³ºÍËùÓзþÎñÆ÷¿Ø¼þµÄ·½·¨¡£µ±ÔÚ¸¸¿Ø¼þÉϵ÷Óà DataBind ʱ£¬Ëü¼¶Áªµ½¸Ã¿Ø¼þµÄËùÓÐ×ӿؼþ¡£ÀýÈ磬DataList1.DataBind() ½«Òò´Ë¶Ô DataList Ä£°åÖеÄÿһ¿Ø¼þµ÷Óà DataBind ·½·¨¡£ÔÚÒ³Éϵ÷Óà DataBind - Page.DataBind() »òÖ»ÊÇ DataBind() - »áµ¼Ö¼ÆËãÒ³ÉϵÄËùÓÐÊý¾Ý°ó¶¨±í´ïʽ¡£Í¨³£´Ó Page_Load ʼþµ÷Óà DataBind£¬ÈçÏÂÀýËùʾ¡£
protected void Page_Load(Object Src, EventArgs E) {
DataBind();
}
Protected Sub Page_Load(Src As Object, E As EventArgs)
DataBind()
End Sub
protected function Page_Load(Src:Object, E:EventArgs) : void {
DataBind();
}
Èç¹û°ó¶¨±í´ïʽÔÚÔËÐÐʱ¼ÆËãΪԤÆÚµÄÊý¾ÝÀàÐÍ£¬Ôò¿ÉÒÔÔÚ .aspx Ò³µÄÉùÃ÷½ÚÖеļ¸ºõÈκÎλÖÃʹÓð󶨱í´ïʽ¡£ÉÏÃæµÄ¼òµ¥ÊôÐÔ¡¢±í´ïʽºÍ·½·¨Ê¾ÀýÔÚ¼ÆËãʱÏòÓû§ÏÔʾÎı¾¡£ÕâЩÇé¿öÏ£¬Êý¾Ý°ó¶¨±í´ïʽ±ØÐë¼ÆËãΪ String ÀàÐ͵ÄÖµ¡£ÔÚ¼¯ºÏʾÀýÖУ¬Êý¾Ý°ó¶¨±í´ïʽ¼ÆËãΪ ListBox µÄ DataSource ÊôÐÔµÄÓÐЧÀàÐÍÖµ¡£Äú¿ÉÄܻᷢÏÖÓбØҪת»»°ó¶¨±í´ïʽÖеÄÀàÐÍÖµÒÔ²úÉúËùÐèµÄ½á¹û¡£ÀýÈ磬Èç¹û count ÊÇÕûÊý£º
Number of Records: <%# count.ToString() %>
°ó¶¨µ½¼òµ¥ÊôÐÔ
ASP.NET Êý¾Ý°ó¶¨Óï·¨Ö§³Ö°ó¶¨µ½¹«¹²±äÁ¿¡¢Ò³µÄÊôÐÔºÍÒ³ÉÏÆäËû¿Ø¼þµÄÊôÐÔ¡£
ÏÂÃæµÄʾÀý˵Ã÷ÈçºÎ°ó¶¨µ½¹«¹²±äÁ¿ºÍÒ³Éϵļòµ¥ÊôÐÔ¡£×¢ÒâÕâЩֵÔÚ DataBind() µ÷ÓÃÇ°³õʼ»¯¡£
<html>
<head>
<script language="C#" runat="server">
void Page_Load(Object sender, EventArgs e) {
Page.DataBind();
}
string custID{
get {
return "A
Ïà¹ØÎĵµ£º
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
Asp.Net¼¼Êõѧϰ˳ÐòÎÊÌâ
Èç¹ûÄãÒѾÓн϶àµÄÃæÏò¶ÔÏ󿪷¢¾Ñ飬Ìø¹ýÒÔÏÂÕâÁ½²½£º
µÚÒ»²½:ÕÆÎÕÒ»ÃÅ.NETÃæÏò¶ÔÏóÓïÑÔ£¬C££»òVB.NET¡£
ÎÒÇ¿ÁÒ·´¶ÔÔÚûϵͳѧ¹ýÒ»ÃÅÃæÏò¶ÔÏó£¨OO£©ÓïÑÔµÄÇ°ÌáÏÂȥѧASP.NET¡£ ASP.NETÊÇÒ»¸öÈ«ÃæÏò¶ÔÏóµÄ¼¼Êõ£¬²»¶®OO£¬ÄǾø¶Ôѧ²»ÏÂÈ¥£¡
µÚ¶þ²½ ......
DropDownList Web ·þÎñÆ÷¿Ø¼þʹÓû§¿ÉÒÔ´ÓÔ¤¶¨ÒåµÄÏÂÀÁбíÖÐÑ¡Ôñµ¥¸öÏî¡£
Ò»¡¢¹¦ÄÜ
¿ÉÒÔʹÓà DropDownList ¿Ø¼þÖ´ÐÐÏÂÁвÙ×÷£º
·ÉèÖÿؼþµÄ´óС£¨ÒÔÏñËØΪµ¥Î»£©¡£
·Ê¹ÓÃÊý¾Ý°ó¶¨À´Ö¸¶¨ÒªÏÔʾµÄÏîÁÐ±í¡£
·È·¶¨Ñ¡¶¨µÄÏî¡£
·ÒÔ±à³Ì·½Ê½Ö¸¶¨Ñ¡¶¨µÄÏî¡£
& ......
asp.netÓ¦ÓõÚÒ»´Î·ÃÎÊʱʱÓÉÓÚÒª±àÒ룬ËùÒÔ·´Ó¦Âý£¬ÑÏÖØÓ°ÏìÓû§ÌåÑ飡£¨ÒÔÖ±»Óû§±§Ô¹ËÙ¶ÈÂý£º£¨£©£¬Ô¤±àÒëÖ®ºóÃ÷ÏÔÌá¸ß·´Ó¦Ëٶȣº£©
Àý£º
D:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_compiler -v /anything -p E:\erp_pr
o_vss0330\1.1\erp_pro_vss\WebApp D:\ERPApp
˵Ã÷£ºanything Èκζ¼ÐÐ ......
11. ½«µ÷ÓÃÃܼ¯Ð굀 COM ×é¼þǨÒƵ½ÍйܴúÂë ¡¡¡¡
.NET Framework ÌṩÁËÒ»¸ö¼òµ¥µÄ·½·¨Ó봫ͳµÄ COM ×é¼þ½øÐн»»¥¡£ÆäÓŵãÊÇ¿ÉÒÔÔÚ±£ÁôÏÖÓÐͶ×ʵÄͬʱÀûÓÃеÄƽ̨¡£µ«ÊÇÔÚijЩÇé¿öÏ£¬±£Áô¾É×é¼þµÄÐÔÄÜ¿ªÏúʹµÃ½«×é¼þǨÒƵ½ÍйܴúÂëÊÇÖµµÃµÄ¡£Ã¿Ò»Çé¿ö¶¼ÊDz»Ò»ÑùµÄ£¬¾ö¶¨ÊÇ·ñÐèҪǨÒÆ×é¼þµÄ×îºÃ·½·¨ÊÇ¶Ô Web Õ ......