asp.netµÄ³£ÓôúÂë
0.ÓÃsessionÅжÏÊÇ·ñµÇ½
if(Session["login"] == null)
{
Response.Redirect("error.aspx");
}
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?i
Ïà¹ØÎĵµ£º
1. Ìí¼ÓCSSÑùʽ: Style style = new Style();
style.ForeColor = System.Drawing.Color.Navy;
  ......
1£¬±¾µØÉú³ÉµÄÎļþÏòIIS¹«¿ªµÄ·¾¶Öи´ÖÆ£¬ÓÐʱ»á·¢Éú°²È«´íÎó£¬ÕâÊÇÒòΪĿ±êÎļþ¼ÐÏ£¬Ã»ÓÐȨÏÞ£¬¿ÉÒÔ¿¼ÂÇÉèÖÃEveryoneȨÏÞ,µ«Çë½÷É÷ʹÓá£
2£¬LoadÒ³ÃæµÄʱºòÈç¹û·¢Éú “ûÓÐÕÒµ½Îļþ”ÕâÑùµÄ´íÎ󣬾ÍÐèÒª²é¿´ÄãдÈëǰ̨µÄ¸÷¸öÎļþ·¾¶ÊÇ·ñÕýÈ·£¬°üÀ¨Í¼Æ¬£¬CSSÎļþ£¬jsÎļþµÈµÈ¡£
3£¬ASP ÔÚLoadÒ³ÃæµÄ¹ý³Ì£¬Ê ......
ÓÐʱºòÓÃiisÅäÖõÄÍøÕ¾£¬×ÜÊdzöÏÖÎÞ·¨ÏÔʾ¸ÃÒ³µÄÌáʾ
³öÏÖÕâÖÖÎÊÌâµÄÔÒòÓжàÖÖ£¬¾ßÌåÊÇÄÄÖÖ£¬×ÜÒ²¸ã²»´óÃ÷°×£¬²»¹ý£¬Ã¿´ÎÈ¥½â¾öÕâ¸öÎÊÌâµÄʱʱºò£¬
×Ü»áÏëµ½Õâ¸ö·½·¨£º
¾ÍÊÇ.net ÖØÐÂ×¢²áiis
²Ù×÷ÊÇ£º
1.ÔÚ“¿ªÊ¼”--“ÔËÐДÖÐÃüÁîÌáʾ·ûÏ ÊäÈë“cd C:\WINDOWS\Microsoft.NET\Framework\ ......
Ò³Ãæ»º´æÊ¹ÓÃOutputCacheÖ¸Áî¡£ÆäÖÐDurationºÍVaryByParamÌØÐÔÊDZØÐëµÄ¡£
Location¿ØÖÆÒ³Ã滺´æµÄλÖÃLocationº¬ÒåAnyĬÈÏÖµ¡£Òâζ×ÅÒ³ÃæµÄÊä³ö¿ÉÒÔ»º´æÔÚ¿Í»§¶Ëä¯ÀÀÆ÷£¬»º´æÔÚÈκÎ"ÏÂÓÎ"µÄ¿Í»§¶Ë£¨Èç´úÀí·þÎñÆ÷£©£¬»ò»º´æÔÚWeb·þÎñÆ÷±¾ÉíClientÖ¸Ã÷Êä³ö»º´æÖ»ÄÜ´æ´¢ÔÚ·¢³öÇëÇóµÄ¿Í»§¶Ë£¨¼´ä¯ÀÀÆ÷£©µÄ±¾µØ»º´æÖÐDownstreamÖ ......
½â¾ö°ì·¨
1.ÔÚ´úÂëÀïÃæ,°Ñδ¹Ø±ÕµÄÁ¬½Ó¹Ø±Õ
2.À©´ó¹²Ïí³Ø,·½·¨ÈçÏÂ:
½â¾ö·½·¨¿ÉÒÔÊÇÐÞ¸ÄÁ¬½Ó³ØµÄÁ¬½ÓÉú´æÆÚ,ÒòΪĬÈÏÖµÊÇ60Ãë,¼´Á¬½Ó´ÓÓ¦ÓóÌÐò±»Êͷźó¿ÉÒÔÔÚ³ØÖб£´æµÄʱ¼ä¡£
¾ßÌå²Ù×÷²½ÖèÈçÏ£º
Èç¹ûÊÇODBCµÄ»°£¬Ôò¿ÉÒÔÔÚODBC Data Source AdministratorÖÐÊÖ¶¯¸ü¸Ä£¬¸Ã³ÌÐòλÓÚ“Start”²Ëµ¥ÖеēP ......