1¡¢ÀàÊÇÒýÓÃÀàÐÍ£¬½á¹¹ÔòÊÇÖµÀàÐÍ¡£Òò´Ë½á¹¹ÊÇ·ÅÔÚÕ»£¨Stack£©ÀÀàÔò½ö½öÊǽ«ÒýÓõØÖ·´æ·ÅÔÚÕ»À¶ø¾ßÌåµÄÖµÔò´æ·ÅÔÚ¶Ñ£¨heap£©Àï¡£
2¡¢¾ÝµÚ1µã¿ÉÒԵóö½áÂÛ£¬ÄǾÍÊÇÀà¶ÔÏóͨ³£ÓÃÀ´´«µÝ´óÊý¾Ý£¬¶ø½á¹¹¶ÔÏóÔòÓÃÀ´´«µÝСÊý¾Ý¡£
3¡¢Àà¿ÉÒԼ̳кͱ»¼Ì³Ð£¬¶ø½á¹¹Ôò²»Ö§³Ö¡£µ«½á¹¹ºÍÀàÒ»Ñù¿ÉÒԼ̳Ð×Ô½Ó¿Ú¡£
4¡¢½á¹¹¶ÔÏó²»ÄÜÏñÀà¶ÔÏóÒ»Ñù¸³ÖµÎªnull¡£
5¡¢½á¹¹Ã»ÓÐÎö¹¹Æ÷¡£ÀàÓй¹ÔìºÍÎö¹¹º¯Êý¡£
6¡¢½á¹¹²»ÄÜÏñÀàÒ»Ñù¶¨ÒåΪ³éÏóµÄ¡£
7¡¢ÔڽṹÖв»ÄÜÖØÐ´·½·¨£¬³ý·ÇÊÇobjectÀàÐ͵ÄÈçÏ·½·¨£º
Equals()
GetHashCode()
GetType()
ToString()
ÈôÒªÈýṹ¾ßÓжàÌ¬ÌØÐÔ£¬¿ÉÒÔÈÃÆäʵÏÖ½Ó¿Ú¡£
8¡¢ÔÚÀàÖж¨ÒåµÄʼþÊÇḬ̈߳²È«µÄ£¬¶ø½á¹¹Ôò²»ÊÇ¡£
9¡¢½á¹¹×ÜÊǾßÓÐÒ»¸öĬÈϵĹ«¹²Î޲ι¹Ô캯Êý£¬µ«È´²»ÄÜÏñÀàÒ»Ñù¶¨Òå˽ÓеÄÎ޲ι¹Ô캯Êý£¨½á¹¹Ò²²»ÄÜÔÙ¶¨Ò幫¹²µÄÎ޲ι¹Ô캯Êý£¬ÕâÓëÀ಻Ïàͬ£©¡£
10¡¢ÀàÖеľ²Ì¬¹¹Ô캯Êý»á±»µ÷Ó㬶ø½á¹¹È´²»ÄÜ¡£Òò´ËÔڽṹÖж¨ÒåµÄ¾²Ì¬¹¹Ô캯Êý£¬ËäÈ»¿ÉÒÔ±àÒëͨ¹ý£¬µ«È´Ã»ÓмÛÖµ¡£
11¡¢½á¹¹²»ÄÜÏñÀàÒ»Ñù¶¨Òåvolatile×ֶΡ£volatile×Ö¶ÎÖ÷ÒªÓÃÓÚ²¢·¢£¬ËüÏ൱ÓÚ·½·¨ÌåµÄlock¡£
12¡¢¿ÉÒԶԽṹÀàÐÍʹÓÃsizeof£¬¶ÔÀ ......
ĸ°æÒ³Ãæ
-- н¨Ò»Ä¸°æÒ³Ãæ
-- ÔÚÊʵ±Î»ÖüÓÈë´úÂ룺
<asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">
...ÕâÖ®¼äµÄÄÚÈÝÈç¹ûûÓÐContentÄÚÈÝ£¬½«»áµÃµ½ÏÔʾ£»
...Èç¹ûÓÐContentÄÚÈÝ£¬½«»á±»ContentÄÚÈÝÌæ»»µô
</asp:ContentPlaceHolder>
ContentÒ³Ãæ
-- н¨Ò»WEB´°Ìå
-- ÔÚÊʵ±Î»ÖüÓÈë´úÂë
<asp:Content ContentPlaceHolderID=ContentPlaceHolder3 runat=server>
...ÕâÖ®¼äµÄÄÚÈݽ«»á²åÈëÔÚĸ°æ²åÈëµãλÖÃ
</asp:Content>
ĸ°æÖ®¼äʹÓü¶Áª£¬×Óĸ°æµ±×öÒ»¸öContent´¦Àí£¬µ«Èç¹ûÐèÒªÍêÕûÏÔʾ£¬±ØÐè°´ÏÂÃæµÄ²½Ö裺
Mainĸ°æ-->×Óĸ°æ-->Content £»Õ⽫ÄÜÏÔʾMainĸ°æ£¬×Óĸ°æ£¬ContentÉϵÄËùÓÐÄÚÈÝ
Mainĸ°æ-->×Óĸ°æ
Content
&nbs ......
ÈÕÆÚת»¯Ò»
ΪÁË´ïµ½²»Í¬µÄÏÔʾЧ¹ûÓÐʱ£¬ÎÒÃÇÐèÒª¶Ôʱ¼ä½øÐÐת»¯£¬Ä¬ÈϸñʽΪ£º2007-01-03 14:33:34 £¬Òª×ª»¯ÎªÆäËû¸ñʽ£¬ÒªÓõ½DateTime.ToStringµÄ·½·¨(String, IFormatProvider)£¬ÈçÏÂËùʾ£º
using System;
using System.Globalization;
String format="D";
DateTime date=DataTime,Now;
Response.Write(date.ToString(format, DateTimeFormatInfo.InvariantInfo));
½á¹ûÊä³ö
Thursday, June 16, 2005
²ÎÊýformat¸ñʽÏêϸÓ÷¨£º
¸ñʽ×Ö·û ¹ØÁªÊôÐÔ/˵Ã÷
d ShortDatePattern
D LongDatePattern
f ÍêÕûÈÕÆÚºÍʱ¼ä£¨³¤ÈÕÆÚºÍ¶Ìʱ¼ä£©
F FullDateTimePattern£¨³¤ÈÕÆÚºÍ³¤Ê±¼ä£©
g ³£¹æ£¨¶ÌÈÕÆÚºÍ¶Ìʱ¼ä£©
G ³£¹æ£¨¶ÌÈÕÆÚºÍ³¤Ê±¼ä£©
m¡¢M MonthDayPattern
r¡¢R RFC1123Pattern
s ʹÓõ±µØÊ±¼äµÄ SortableDateTimePattern£¨»ùÓÚ ISO 8601£©
t ShortTimePattern
T LongTimePattern
u UniversalSortableDateTimePattern ÓÃÓÚÏÔʾͨÓÃʱ¼äµÄ¸ñʽ
U ʹÓÃͨÓÃʱ¼äµÄÍêÕûÈÕÆÚºÍʱ¼ä£¨³¤ÈÕÆÚºÍ³¤Ê±¼ä£©
y¡¢Y YearMonthPattern
ϱíÁгöÁ˿ɱ»ºÏ²¢ÒÔ¹¹Ôì×Ô¶¨ÒåģʽµÄģʽ¡£ÕâЩģʽÊÇÇø·Ö´óСдµÄ£»ÀýÈ磬ʶ±ð“MM”£¬µ«²»Ê¶±ð&ldquo ......
ÈÕÆÚת»¯Ò»
ΪÁË´ïµ½²»Í¬µÄÏÔʾЧ¹ûÓÐʱ£¬ÎÒÃÇÐèÒª¶Ôʱ¼ä½øÐÐת»¯£¬Ä¬ÈϸñʽΪ£º2007-01-03 14:33:34 £¬Òª×ª»¯ÎªÆäËû¸ñʽ£¬ÒªÓõ½DateTime.ToStringµÄ·½·¨(String, IFormatProvider)£¬ÈçÏÂËùʾ£º
using System;
using System.Globalization;
String format="D";
DateTime date=DataTime,Now;
Response.Write(date.ToString(format, DateTimeFormatInfo.InvariantInfo));
½á¹ûÊä³ö
Thursday, June 16, 2005
²ÎÊýformat¸ñʽÏêϸÓ÷¨£º
¸ñʽ×Ö·û ¹ØÁªÊôÐÔ/˵Ã÷
d ShortDatePattern
D LongDatePattern
f ÍêÕûÈÕÆÚºÍʱ¼ä£¨³¤ÈÕÆÚºÍ¶Ìʱ¼ä£©
F FullDateTimePattern£¨³¤ÈÕÆÚºÍ³¤Ê±¼ä£©
g ³£¹æ£¨¶ÌÈÕÆÚºÍ¶Ìʱ¼ä£©
G ³£¹æ£¨¶ÌÈÕÆÚºÍ³¤Ê±¼ä£©
m¡¢M MonthDayPattern
r¡¢R RFC1123Pattern
s ʹÓõ±µØÊ±¼äµÄ SortableDateTimePattern£¨»ùÓÚ ISO 8601£©
t ShortTimePattern
T LongTimePattern
u UniversalSortableDateTimePattern ÓÃÓÚÏÔʾͨÓÃʱ¼äµÄ¸ñʽ
U ʹÓÃͨÓÃʱ¼äµÄÍêÕûÈÕÆÚºÍʱ¼ä£¨³¤ÈÕÆÚºÍ³¤Ê±¼ä£©
y¡¢Y YearMonthPattern
ϱíÁгöÁ˿ɱ»ºÏ²¢ÒÔ¹¹Ôì×Ô¶¨ÒåģʽµÄģʽ¡£ÕâЩģʽÊÇÇø·Ö´óСдµÄ£»ÀýÈ磬ʶ±ð“MM”£¬µ«²»Ê¶±ð&ldquo ......
ʾÀýÒ»
ÔÚGlobal.asax.csÎļþÖУº
protected void Application_Start(Object sender, EventArgs e)
{
System.Timers.Timer timer1 = new System.Timers.Timer();
timer1.Interval = 50000; // 50000 ºÁÃë = 50Ãë
timer1.Elapsed += new System.Timers.ElapsedEventHandler(timer1_Elapsed);
timer1.AutoReset = true;
timer1.Enabled = true;
timer1.Start();
}
void timer1_Elapsed(object source, Sy ......
The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating MVC-based Web applications. The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc namespace and is a fundamental, supported part of the System.Web namespace. MVC is a standard design pattern that many developers are familiar with. Some types of Web applications will benefit from the MVC framework. Others will continue to use the traditional ASP.NET application pattern that is based on Web Forms and postbacks. Other types of Web applications will combine the two approaches; neither approach excludes the other. MVC¼Ü¹¹Ä£ ......
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("£¼script£¾window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')£¼/script£¾")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attributes.Add("onclick","return confirm('È·ÈÏ?')");
button.attributes.add("onclick","if(confirm('are you sure...?')){return true;}else{return false;}")
3.ɾ³ý±í¸ñÑ¡¶¨¼Ç¼
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex];
string deleteCmd = "Delete from Employee where emp_id = " + intEmpID.ToString()
4.ɾ³ý±í¸ñ¼Ç¼¾¯¸æ
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e)
{
¡¡switch(e.Item.ItemType)
¡¡{
case ListItemType.Item :
case ListItemType.AlternatingItem :
case ListItemType.EditItem:
¡¡TableCell myTableCell;
¡¡myTableCell = e.Item.Cells[14];
¡¡LinkButton myDeleteButton ;
¡¡myDeleteButton = (LinkButton)myTableCell.Controls[0];
¡¡myDe ......