Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

ÔÚASP.NetÖÐʵÏÖRSA¼ÓÃÜ


ÔÚASP.NetÖÐʵÏÖRSA¼ÓÃÜ
ÔÚÎÒÃÇʵ¼ÊÔËÓÃÖУ¬¼ÓÃÜÊDZ£Ö¤Êý¾Ý°²È«µÄÖØÒªÊֶΡ£ÒÔǰʹÓÃASPʱ£¬¶ÔÊý¾Ý¼ÓÃÜ¿ÉÒÔʹÓÃMD5ºÍSHA1Ëã·¨£¬ÕâÁ½ÖÖËã·¨ËäÈ»¿ì½ÝÓÐЧ£¬µ«ÊÇÎÞ·¨¶Ôͨ¹ýËüÃǼÓÃܵÄÃÜÎĽøÐз´ÔËË㣬¼´ÊǽâÃÜ¡£Òò´ËÐèÒª½âÃÜÊý¾ÝµÄ³¡ºÏ£¬ÕâÁ½ÖÖ·½·¨¾Í²»Ì«ÊʺÏÁË¡£µ±È»ÄãÒ²¿ÉÒÔ×Ô¼º±àдÊÊÓõļÓÃܺͽâÃܳÌÐò£¬²»¹ýÕâ¶Ô±àдÕß ......

ASP.NETÉú³ÉËæ»úÃÜÂë

ÔÚ¿ª·¢ÐèÒªÓû§×¢²áºó²ÅÄÜʹÓÃÌṩµÄ¸÷ÏÄܵÄÓ¦ÓóÌÐòʱ£¬ÔÚÐÂÓû§Ìá½»×¢²áÐÅÏ¢ºó£¬½Ï³£¼ûµÄ×ö·¨ÊÇÓɳÌÐòÉú³ÉËæ»úÃÜÂ룬Ȼºó·¢ËÍÃÜÂëµ½Óû§×¢²áʱÌîдµÄµç×ÓÐÅÏ䣬Óû§ÔÙÓÃÊÕµ½µÄÃÜÂëÀ´¼¤»îÆäÕÊ»§¡£
ʵÏÖASP.NETÉú³ÉËæ»úÃÜÂ빦ÄÜÊǺÜÈÝÒ׵ģ¬ÏÂÃæµÄ´úÂë¸ø³öÁËÍêÕûµÄʵÏÖ·½·¨£º
public static string MakePasswor(string ......

13¸ö²»¿É²»ÖªµÄASP.NET MVCÀ©Õ¹µã

ASP.NET MVCÉè¼ÆµÄÖ÷ÒªÔ­ÔòÖ®Ò»ÊÇ¿ÉÀ©Õ¹ÐÔ¡£´¦Àí¹ÜÏߣ¨processing pipeline£©ÉϵÄËùÓУ¨»ò´ó¶àÊý£©¶«Î÷¶¼ÊÇ¿ÉÌæ»»µÄ¡£Òò´Ë£¬Èç¹ûÄú²»Ï²»¶ASP.NET MVCËùʹÓõÄÔ¼¶¨£¨»òȱ·¦Ä³Ð©Ô¼¶¨£©£¬Äú¿ÉÒÔ´´½¨×Ô¼ºµÄ·þÎñÀ´Ö§³ÖÄúµÄÔ¼¶¨£¬²¢½«Æä×¢Èëµ½Ö÷¹ÜÏßÖС£
ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«´Ó¹ÜÏß¿ªÊ¼Ö±µ½ÊÓͼ³ÊÏÖ£¬ÖðÒ»ÏòÄúչʾÿ¸öASP.NET MVC¿ª ......

ASP.Net Ò³Ã滺´æƬ¶ÎʹÓü¼ÇÉ

Ò³Ã滺´æʹÓÃOutputCacheÖ¸Áî¡£ÆäÖÐDurationºÍVaryByParamÌØÐÔÊDZØÐëµÄ¡£ Location¿ØÖÆÒ³Ã滺´æµÄλÖÃLocationº¬ÒåAnyĬÈÏÖµ¡£Òâζ×ÅÒ³ÃæµÄÊä³ö¿ÉÒÔ»º´æÔÚ¿Í»§¶Ëä¯ÀÀÆ÷£¬»º´æÔÚÈκÎ"ÏÂÓÎ"µÄ¿Í»§¶Ë£¨Èç´úÀí·þÎñÆ÷£©£¬»ò»º´æÔÚWeb·þÎñÆ÷±¾ÉíClientÖ¸Ã÷Êä³ö»º´æÖ»ÄÜ´æ´¢ÔÚ·¢³öÇëÇóµÄ¿Í»§¶Ë£¨¼´ä¯ÀÀÆ÷£©µÄ±¾µØ»º´æÖÐDownstreamÖ ......

ASP.Net³¬Ê±Ê±¼ä

½â¾ö°ì·¨
1.ÔÚ´úÂëÀïÃæ,°Ñδ¹Ø±ÕµÄÁ¬½Ó¹Ø±Õ
2.À©´ó¹²Ïí³Ø,·½·¨ÈçÏÂ:
½â¾ö·½·¨¿ÉÒÔÊÇÐÞ¸ÄÁ¬½Ó³ØµÄÁ¬½ÓÉú´æÆÚ,ÒòΪĬÈÏÖµÊÇ60Ãë,¼´Á¬½Ó´ÓÓ¦ÓóÌÐò±»Êͷźó¿ÉÒÔÔÚ³ØÖб£´æµÄʱ¼ä¡£
¾ßÌå²Ù×÷²½ÖèÈçÏ£º
Èç¹ûÊÇODBCµÄ»°£¬Ôò¿ÉÒÔÔÚODBC Data Source AdministratorÖÐÊÖ¶¯¸ü¸Ä£¬¸Ã³ÌÐòλÓÚ“Start”²Ëµ¥ÖеēP ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ