Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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", "locat


Ïà¹ØÎĵµ£º

ASP.NET(ASPX)Ò³Ãæ»ñÈ¡form±íµ¥Ìá½»ÔªËصÄÖµ


html֪ʶ£¬Request.Form
½ÓÊÕµÄÊÇNameÖµ£¬¶ø·ÇIDÖµ
ÈôÊÇÓÃaspxÒ³ÃæÈ¡Öµ£¬±íµ¥ÖеÄrunat="server"Ҫȥµô¡£
asp.net֪ʶ£¬asp.netµÄ¿Ø¼þµÄIDºÍNameÖµÊÇÒ»ÑùµÚ£¬µ«ÊÇÆäÔÚ¿Í»§¶Ë±íÏÖÊÇcontrol.clientID¶ø·Ç
control.ID
asp.net±¾ÉíÒ²ÊÇ¿ÉÒÔ¿çÒ³Ìá½»µÎ£¬Èç¹ûÊÇʹÓÃ×Ô¼º´øµÄ¿çÒ³Ìá½»¾Í²»´æÔÚÉÏÊöÎÊÌ⣬²»¹ýas ......

ASP.NETÖеÄsession´æ´¢Ä£Ê½

ÔÚasp.netÖеÄSession´æ´¢·½Ê½²»ÏóaspÄÇÑùµ¥Ò»£¬Ò»¹²ÌṩÁËÈýÖÖ´æ´¢·½Ê½£¬ÓÉÓÚ×î½üÒ»¸ö2000¶àÈËʹÓõÄwebÈí¼þ³öÏÖÁ˹ÊÕÏ£¬Óû§Ã¿ÌìÔçÉÏÔÚijһʱ¿Ì³öÏÖÄÑÒԵǽÏÖÏ󣬽Ó×ÅSession¶ªÖµ³öÏÖ£¬Ö»ÓÐÖØÆôIIS,»ò»úÆ÷.Õâʱ³ÌÐò»Ö¸´Õý³£ÁË.ÕûÌ춼²»»á³öÏÖͬÑùµÄÎÊÌâ £¬µ«ÊǵڶþÌìÒÀ¾É!ÕâÖÖÏÖÏó³ÖÐøÁ˺ü¸Ì죬ÎÒ¼ì²éÁËÒ»ÏÂÈÕÖ¾Îļþ£¬¸ ......

asp.net Öиıädatagrid µÄÁпí

private void Page_Load(object sender, System.EventArgs e)
{

DataGrid1.Columns[0].HeaderText = "ÎÄÕ±êÌâ";
DataGrid1.Columns[1].HeaderText = "·¢²¼ÈÕÆÚ";
DataGrid1.Columns[0].HeaderStyle.HorizontalAlign = HorizontalA ......

Asp.NetÖÐHttpMoudule³õʼ»¯³ÌÐò

ΪÁËÍü¼Ç:
1,System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32);:void
//´ÓIISÀ´µÄÇëÇó
2,System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest) : Void
//ÔÚÕâÒ»²½´´½¨Ò»¸öHttpContext¶ÔÏó
3, System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext) : IHttpHandler
// ......

ASP.NET Web ServiceЭÒéÏà¹Ø

=================================================================================
How to enable an ASP.NET WebService to listen to HTTP POST calls
=================================================================================
Imagine you developed an ASP.NET WebService, but the client that nee ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ