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

ASP.NET³ÌÐòÖг£ÓõÄÈýÊ®ÈýÖÖ´úÂë

 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];
¡¡¡¡¡¡myDeleteButton.Attributes.Add("onclick","return confirm(’ÄúÊÇ·ñÈ·¶¨ÒªÉ¾³ýÕâÌõÐÅÏ¢’);");
¡¡¡¡¡¡break;
¡¡¡¡default:
¡¡¡¡¡¡break;
¡¡}
}
¡¡¡¡
5.µã»÷±í¸ñÐÐÁ´½ÓÁíÒ»Ò³
private void grdCustomer_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
¡¡//µã»÷±í¸ñ´ò¿ª
¡¡if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
¡¡¡¡e.Item.Attributes.Add("onclick","window.open(’Default.aspx?id=" + e.Item.Cells[0].Text + "’);");
}
Ë«»÷±í¸ñÁ¬½Óµ½ÁíÒ»Ò³
ÔÚitemDataBindʼþÖÐ
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
¡¡string OrderItemID =e.item.cells[1].Text;
¡¡...
¡¡e.item.Attributes.Add("ondblclick", "location.href=’../ShippedGrid.aspx?id=" + OrderItemID + "’");
}
¡¡¡¡
Ë«»÷±í¸ñ´ò¿ªÐÂÒ»Ò³
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)


Ïà¹ØÎĵµ£º

asp.net»ñÈ¡µ±Ç°Ê±¼ä

ÔÚc# / ASP.netÖÐÎÒÃÇ¿ÉÒÔͨ¹ýʹÓÃDataTimeÕâ¸öÀàÀ´»ñÈ¡µ±Ç°µÄʱ¼ä¡£Í¨¹ýµ÷ÓÃÀàÖеĸ÷ÖÖ·½·¨ÎÒÃÇ¿ÉÒÔ»ñÈ¡²»Í¬µÄʱ¼ä£ºÈ磺ÈÕÆÚ£¨2008-09-04£©¡¢Ê±¼ä£¨12£º12£º12£©¡¢ÈÕÆÚ+ʱ¼ä£¨2008-09-04 12£º11£º10£©µÈ¡£
//»ñÈ¡ÈÕÆÚ+ʱ¼ä
DateTime.Now.ToString();            // 2008- ......

asp.net×Ô¶¨Òå´íÎó´¦ÀíÒ³ÃæµÄ¼¸ÖÖ·½·¨

ASP.NET ÌṩÈýÖÖÓÃÓÚÔÚ³öÏÖ´íÎóʱ²¶»ñºÍÏìÓ¦´íÎóµÄÖ÷Òª·½·¨£ºPage_Error ʼþ¡¢Application_Error ʼþÒÔ¼°Ó¦ÓóÌÐòÅäÖÃÎļþ (Web.config)¡£
Èç¹ûÄú²»µ÷Óà Server.ClearError »òÕß²¶»ñ Page_Error »ò Application_Error ʼþÖеĴíÎó£¬Ôò½«¸ù¾Ý Web.config ÎļþµÄ <customErrors> ²¿·ÖÖеÄÉèÖô¦Àí´íÎó¡£ÔÚ <cus ......

ASP.NetÎåÖÖ»º´æ»úÖÆ

Application
1.ApplicationÓÃÀ´±£´æËùÓÐÓû§¹²ÓõÄÐÅÏ¢
2.ÔÚAspʱ´ú£¬Èç¹ûÒª±£´æµÄÊý¾ÝÔÚÓ¦ÓóÌÐòÉú´æÆÚÄÚ²»»á»òÕߺÜÉÙ·¢Éú¸Ä±ä£¬ÄÇôʹÓÃApplicationÊÇÀíÏëµÄÑ¡Ôñ¡£µ«ÊÇÔÚAsp.net¿ª·¢»·¾³ÖÐÎÒÃÇ°ÑÀàËƵÄÅäÖÃÊý¾Ý·ÅÔÚWeb.configÖС£
3.Èç¹ûҪʹÓÃApplication ҪעÒâµÄÊÇËùÓеÄд²Ù×÷¶¼ÒªÔÚApplication_OnStartʼþÖÐÍê³É ......

Asp.net ´òÓ¡web ÍøÒ³ ÈçºÎ²»ÏÔʾ ÍøÖ· Ò³Âë


1.¶ÔIEä¯ÀÀÆ÷½øÐÐÉèÖÃ
 Îļþ-¡µÒ³ÃæÉèÖÃ-¡µ½«ÀïÃæµÄҳüºÍÒ³½ÅµÄÄÚÈÝÇå¿Õ ¾ÍOKÁË
2.Ò³Ãæ´úÂëʵÏÖ Javascript
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><!--  & ......

Asp.netÓëSQLÒ»Æð´ò°ü²¿Êð°²×°


Õû¸öSQLºÍAsp.net(vb.net)Ò»Æð´ò°üµÄÈ«¹ý³ÌдһÏ¡£
Ò».×¼±¸±ØÒªµÄÎļþ
1. SQL½Å±¾Îļþ£¬Éú³ÉÒÔºó°²×°¹ý³ÌÖÐÐèÒªµÄ±íºÍ´æ´¢¹ý³ÌµÈµÈ£»
Éú³ÉÖ®ºó£¬¾ÍÔÝʱ°ÑËüÃüÃûΪdb.sql(×¢Òâ´óСд)
2.LisenceFile.rtfµÄ°²×°Îļþ£¬ÒòΪÎÒµÄϵͳÊǸöÈ˵ģ¬¶øÇÒfreeµÄ£¬ËùÒÔ¾ÍûÓÐ×ö¡£Õâ¸öÒÔºóÒ²ÊÇÒªÓõ½µÄ¡£
¶þ.ÔÚ×Ô¼ºÏÖÓеÄÏîÄ¿Àïà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ