ASP.NETĸ°åµÄÓ¦Óã¨×ª£©
ASP.NETĸ°åµÄÓ¦Óã¨×ª£©
2009Äê11ÔÂ30ÈÕ ÐÇÆÚÒ» ÏÂÎç 01:11
ĸ°æÒ³ÊÇVS2005ÖÐÐÂÒýÈëµÄÒ»¸ö¸ÅÄËüºÜºÃµØʵÏÖ½çÃæÉè¼ÆµÄÄ£¿é»¯£¬²¢ÇÒʵÏÖʵÏÖÁË´úÂëµÄÖØÓá£Ëü¾ÍÏñ»éÉ´Ó°Â¥ÖеĻéÉ´Ä£°å£¬Í¬Ò»¸ö»éÉ´Ä£°å¿ÉÒÔ¸ø²»Í¬µÄÐÂÈËÓã¬Ö»Òª°ÑËûÃǵÄÕÕƬÌùÔÚÒÑÓеĻéÉ´Ä£°å¾Í¿ÉÒÔÐγÉÒ»ÕÅƯÁÁµÄ»éÉ´ÕÕƬ£¬ÕâÑù¿ÉÒÔ´ó´ó¼ò»¯»éÉ´ÒÕÊõÕÕµÄÉè¼Æ¸´ÔӶȡ£ÕâÀïµÄĸ°æÒ³¾ÍÏñ»éÉ´Ä£°å£¬¶øÄÚÈÝÒ³Ãæ¾ÍÏñÁ½Î»ÐÂÈ˵ÄÕÕƬ¡£
ÔÚVS2003ÖÐûÓÐĸ°æÒ³£¬ÒªÊµÏÖÕâÖÖÉè¼ÆÖØÓõÄЧ¹û£¬ÎÒÃÇÖ»ÄÜÓÓÓû§¿Ø¼þ”À´ÊµÏÖ£¬µ«Óû§¿Ø¼þûÓÐÒ»ÖÖ¿ÉÊÓ»¯µÄ×éºÏÍâ¹Û£¬Ê¹ÓÃÆðÀ´²»Ì«·½±ã¡£
ĸ°æÒ³£¨À©Õ¹ÃûÊÇ.master£©
ËüµÄʹÓøúÆÕͨµÄÒ³ÃæÒ»Ñù£¬¿ÉÒÔ¿ÉÊÓ»¯µÄÉè¼Æ£¬Ò²¿ÉÒÔ±àдºóÖôúÂë¡£ÓëÆÕͨҳÃæ²»Ò»ÑùµÄÊÇ£¬Ëü¿ÉÒÔ°üº¬ContentPlaceHolder¿Ø¼þ£¬ContentPlaceHolder¿Ø¼þ¾ÍÊÇ¿ÉÒÔÏÔʾÄÚÈÝÒ³ÃæµÄÇøÓò¡£
´úÂëÈçÏ£º
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
......
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</div>
</form>
......
×¢Ò⣺
1¡¢ÕâÀïµÄÉùÃ÷ָʾ·ûÊÇ“<%@ Master...%>”
2¡¢ÆäÄÚ²¿°üº¬<asp:contentplaceholder......>¿Ø¼þ
ÄÚÈÝÒ³£¨À©Õ¹ÃûÊÇ.aspx£©
ÔÚ½¨Á¢ÄÚÈÝÒ³ÃæµÄʱºò£¬ÔÚ“Ìí¼ÓÐÂÏԻ°¿òÖÐҪѡÖГѡÔñĸ°æÒ³”¸´Ñ¡¿ò¡£ÕâÑù½¨Á¢µÄÒ³Ãæ¾ÍÊÇÄÚÈÝÒ³Ã棬ÄÚÈÝÒ³ÃæÔÚÏÔʾµÄʱºò»á°Ñĸ°æÃæµÄÄÚÈÝÒ»ÆðÒÔˮӡµ»¯µÄÐÎʽÏÔʾ³öÀ´£¬¶øÔÚĸ°æÒ³ÖеÄContentPlaceHolder¿Ø¼þÇøÓò»á±»ÄÚÈÝÒ³ÃæÖеÄContent¿Ø¼þÌæ»»£¬³ÌÐòÔ±¿ÉÒÔÔÚÕâÀï±àдÄÚÈÝÒ³ÃæÖеÄÄÚÈÝ¡£
´úÂëÈçÏ£º
<%@ Page Language="C#" MasterPageFile="~/MasterPage/MP.master" AutoEventWireup="true" CodeFile="Show1.aspx.cs" Inherits="MasterPage_Show1" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
×¢Ò⣺
Ïà¹ØÎĵµ£º
·ÖÀà: ר¼ÒBlog ÍƼöÕߣºadmin| ä¯ÀÀÁ¿£º489 views| 1 ¸öÆÀÂÛ
Èç¹ûÎÒÃÇÓÃIISËÞÖ÷ASP.net£¬µ¥²½µ÷ÊÔʱ£¬»áÓпÉÄÜÏÂÃæµÄÒì³£±¨³öÀ´£º
—————————
Microsoft Visual Studio
—————————
The web serv ......
Asp.Net ±¸·ÝºÍ»Ö¸´SQL SERVER Êý¾Ý¿â
ÎÒÃÇͨ³£±¸·ÝÊý¾Ý¿âʱ£¬ÐèÒªµÇ¼Êý¾Ý¿â·þÎñÆ÷È¥±¸·ÝºÍ»Ö¸´£¬ÕâÑùºÜ²»·½±ã£¬ÆäʵSQL SERVER×Ô´øµÄÃüÁî¿ÉÄÜÈÃÎÒÃǺܼòµ¥µØʵÏÖÔ¶³Ìͨ¹ýAsp.Net±¸·ÝºÍ»Ö¸´Êý¾Ý¿â¡£
BACKUP DATABASE '±»±¸·ÝµÄÊý¾Ý¿âÃû' TO DISK = '±¸·ÝÎļþ·¾¶';
ALTER DATABASE '±»»Ö¸´µÄÊý¾Ý¿âÃû' ......
asaxÎļþ£º
¡¡¡¡<%@ Control Language="c#" AutoEventWireup="false" Codebehind="counter.ascx.cs" Inherits="JiAnWeb.counter" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
¡¡¡¡<LINK href="css.css" rel="stylesheet">
¡¡¡¡<FONT face="ËÎÌå">
¡¡¡¡<TABLE id="table_coun ......
Ò»¡¢Ð§¹û¼ò½é
¡¡¡¡µ±µã»÷Ò»¼¶À¸Ä¿Ê±£¨ÈçÊ×Ò³£©£¬±»µã»÷µÄÒ»¼¶À¸Ä¿µÄµ¥Ôª¸ñ±³¾°É«·¢Éú±äÉ«£¬Èç¹û¸ÃÒ»¼¶À¸Ä¿ÏÂÓжþ¼¶À¸Ä¿£¬Ôò»áÔÚÏÂÒ»ÐÐÏÔʾ³öÀ´£¬·ñÔò¶þ¼¶À¸Ä¿ÕâÒ»Ðв»»áÏÔʾÈκζ«Î÷£¬µ«»áÕ¼Ò»¶¨µÄ¸ß¶È¡£µ±µã»÷¶þ¼¶À¸Ä¿Ê±£¬ÆäËùÊôµÄÒ»¼¶À¸Ä¿µ¥Ôª¸ñ±³¾°É«·¢Éú±ä»¯£¬Í¬Ê±±»µã»÷µÄ¶þ¼¶À¸Ä¿Ãû³Æ»á¼Ó´Ö£¬²¢ÔÚÇ°·½¼ÓÒ»¸ö“¡ ......
ÔÚÒ»¸öÏîÄ¿¿ª·¢ÖУ¬showdialogµ¯³ö¶Ô»°¿òʱ£¬ÎÒ֮ǰÐ޸ĹýµÄÊý¾Ý²»»á¼°Ê±¸üУ¡
ʹÓýûÓÃURL»º´æµÄ·½·¨,½â¾öÕâ¸öÎÊÌâ
ÔÚasp.netÒ³ÃæµÄºǫ́
if (!IsPostBack)
{
Response.Buffer = true;
......