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
Ïà¹ØÎĵµ£º
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ÄÇÑùµ¥Ò»£¬Ò»¹²ÌṩÁËÈýÖÖ´æ´¢·½Ê½£¬ÓÉÓÚ×î½üÒ»¸ö2000¶àÈËʹÓõÄwebÈí¼þ³öÏÖÁ˹ÊÕÏ£¬Óû§Ã¿ÌìÔçÉÏÔÚijһʱ¿Ì³öÏÖÄÑÒԵǽÏÖÏ󣬽Ó×ÅSession¶ªÖµ³öÏÖ£¬Ö»ÓÐÖØÆôIIS,»ò»úÆ÷.Õâʱ³ÌÐò»Ö¸´Õý³£ÁË.ÕûÌ춼²»»á³öÏÖͬÑùµÄÎÊÌâ £¬µ«ÊǵڶþÌìÒÀ¾É!ÕâÖÖÏÖÏó³ÖÐøÁ˺ü¸Ì죬ÎÒ¼ì²éÁËÒ»ÏÂÈÕÖ¾Îļþ£¬¸ ......
private void Page_Load(object sender, System.EventArgs e)
{
DataGrid1.Columns[0].HeaderText = "ÎÄÕ±êÌâ";
DataGrid1.Columns[1].HeaderText = "·¢²¼ÈÕÆÚ";
DataGrid1.Columns[0].HeaderStyle.HorizontalAlign = HorizontalA ......
ΪÁËÍü¼Ç:
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
// ......
=================================================================================
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 ......