Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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="http://www.knowsky.com/'../ShippedGrid.aspx?id=" + OrderItemID + "'");
}
Ë«»÷±í¸ñ´ò¿ªÐÂÒ»Ò³
if(e.Item.ItemType == ListItemType.Item ||
e.Item.ItemType == ListItemType.AlternatingItem)
{
string OrderItemID =e.item.cells[1].Text;
e.item.Attributes.Add("ondblclick",
"open('../ShippedGrid.aspx?id=" + OrderItemID + "')");
}
¡ï


Ïà¹ØÎĵµ£º

ASP.NET Ò³Ãæ´«Öµ·½·¨»ã×Ü

  ÔÚ×öWEBϵͳ¿ª·¢Ê±£¬Ã¿Ã¿Óöµ½Ò³Ãæ´«ÖµµÄÎÊÌⶼÊÇÔÚʹÓÃ×î¼òµ¥µÄGET·½Ê½À´´«Öµ£¬Èç¹ûÐÅÏ¢Á¿±È½ÏÉÙ²¢ÇÒÓÖ²»Éæ¼°°²È«ÎÊÌâµÄ»°
»¹¿ÉÒÔÓ¦¸¶Ò»Ï£¬µ«ÊÇ´«µÝ´óÁ¿Êý¾Ý¡¢Ãô¸ÐÊý¾ÝµÄʱºò.....
  ÏÂÃæ¾ÍASP.NETÖÐÒ³Ãæ´«Öµ·½Ê½×ö¸ö»ã×Ü£¬ÒÔ±¸²»Ê±Ö»Ðè
1¡¢GET´«Öµ·½Ê½
    ·¢ËÍÒ³Ã棺
    ......

΢ÈíÆóÒµ¿â5.0ѧϰ±Ê¼Ç£¨¾Å£©ASP.NET WEBÓ¦ÓóÌÐò

ÔÚASP.NET Web´°ÌåÓ¦ÓóÌÐòÖУ¬ÍƼöµÄ·½·¨Êǽ«ÈÝÆ÷´æµ½ÓÉApplication×Öµä¶ÔÏóÌṩµÄÈ«¾Ö״̬¡£µ±ÐèÒªµÄʱºòÄã¿ÉÒÔ·ÃÎÊÈÝÆ÷£¬ÉõÖÁʹÓÃHTTPÄ£¿é×Ô¶¯Íê³É¶ÔÒ³ÃæÉϿؼþµÄ×¢Èë¡£
ͨ³£Çé¿öÏ£¬ÄãÓ¦¸ÃʹÓÃApplication×Öµä¶ÔÏóÀ´´æ´¢ÈÝÆ÷µÄµ¥¸öʵÀý¡£Äú¿ÉÄܾö¶¨´´½¨Ö÷ÒªÈÝÆ÷µÄ×ÓÈÝÆ÷£¬²¢½«ËüÃÇ´æ´¢µ½Ã¿¸öÓû§µÄSession¶ÔÏóÖУ¬ÉõÖÁ ......

ASP.NET MVC Óû§ÑéÖ¤ºÍȨÏÞÑéÖ¤


The MVC bits have finally arrived and I’ve spent a while digesting them. I’ve been waiting for the bits to be released to begin working on a side-project, so the first thing I did after downloading them last night was crank it up and start working on a new ASP.NET MVC Web Application p ......

ASP.NETÅäÖÃÎļþWeb.config

(Ò»).Web.ConfigÊÇÒÔXMLÎļþ¹æ·¶´æ´¢,ÅäÖÃÎļþ·ÖΪÒÔϸñʽ
1.ÅäÖýڴ¦Àí³ÌÐòÉùÃ÷
Ìص㣺 λÓÚÅäÖÃÎļþµÄ¶¥²¿£¬°üº¬ÔÚ<configSections>±êÖ¾ÖС£
2.Ìض¨Ó¦ÓóÌÐòÅäÖÃ
Ìصã: λÓÚ<appSetting>ÖС£ ¿ÉÒÔ¶¨ÒåÓ¦ÓóÌÐòµÄÈ«¾Ö³£Á¿ÉèÖõÈÐÅÏ¢.
3.ÅäÖýÚÉèÖÃ
Ìصã: λÓÚ<system.Web>½ÚÖУ¬¿ØÖÆAsp.netÔËÐÐÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ