asp.net³£Óü¼ÇÉ
´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
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)
{
string OrderItemID =e.item.cells[1].Text;
e.item.Attributes.Add("ondblclick",
"open('../ShippedGrid.aspx?id=" + OrderItemID + "')");
}
¡ïÌرð×¢Ò⣺¡¾?id=¡¿ ´¦²»ÄÜΪ ¡
Ïà¹ØÎĵµ£º
¾ÍÊÇÔÚʹÓÃjmail·¢ËÍÓʼþʱ£¬Ê¹ÓõÄÊÇ×Ô¶¯É¨Ãè¹æ¶¨¼ä¸ôʱ¼ä×Ô¶¯·¢Ë͵ģ¬ÏÖÔÚÊÇÏëʵÏÖÒѾ·¢Ë͵ÄÓʼþ½«²»ÔÙ·¢ËÍ£¬¸÷λ´óϺÔõôʵÏÖ£¬ÇóÖú£¡
Ê×ÏÈÃ÷È·µÄÊÇÔÚÊý¾Ý¿â±íÖв¢Ã»Óбêʶ×Ö¶ÎÀ´±æ±ðÓʼþÊÇ·ñÒѾ·¢ËÍ¡£Èç¹ûÎÒÀ´ÉèÖÃÒ»¸öÈ«¾Ö±äÁ¿À´´æ´¢ÕâЩÒѾ·¢ËÍÓʼþµÄID£¬È»ºóÔÚÔÙ´ÎɨÃèʱÀ´±æ±ðÕâЩIDÊÇ·ñÒѾ´æÔڵķ½Ê½À´Åжϣ¬¸ ......
ÒÔblogϵͳΪÀý£¬Ò»¸ö¼òµ¥µÄblogϵͳģÐÍ°üÀ¨£º
1.·¢±íһƪеÄblog
2.ÏÔʾһƪblog
3.ÐÞ¸Äһƪblog
4.ɾ³ýһƪblog
ASP.net MVC»áÊÇÕâÑùµÄURL¹æ»®£º
*. http://www.gaotianpu.com/blog/create,´´½¨
get·½·¨¸øÓû§Õ¹Ê¾Ò»¸öhtml±íµ¥,¹©Óû§Ìá½»Êý¾Ý
post·½·¨½ÓÊÜÓû§Ìá½»µÄÊý¾Ý£¬²åÈëµ½db
*. http://www.gaotianpu. ......
ASP.NET´¦Àí³ÌÐòºÍÄ£¿é
ASP.NET HTTP ´¦Àí³ÌÐò(Handler)ÊÇÏìÓ¦¶Ô ASP.NET Web Ó¦ÓóÌÐòµÄÇëÇó¶øÔËÐеijÌÐò
Èç´¦Àí *.aspxÎļþµÄASP.NET´¦Àí³ÌÐò ......
<%
set conn= server.createobject("ADODB.connection")
conn.open "driver={sybase driver 10};"
"srvr=SYBASE;"
"UID=sa;"
"pwd=sybase;"
sql="select no from tab_st ......
Backup.aspx
protected void Button1_Click(object sender, EventArgs e)
{
string path = Server.MapPath("") + @"\Backup";
if (!Directory.Exists(path))
......