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

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=¡¿ ´¦²»ÄÜΪ ¡


Ïà¹ØÎĵµ£º

ASP.NETÖÐString.IndexOf ·½·¨µÄʹÓÃ

String.IndexOf ·½·¨ (value, [startIndex], [count])
¡¡¡¡±¨¸æÖ¸¶¨×Ö·ûÔÚ´ËʵÀýÖеĵÚÒ»¸öÆ¥ÅäÏîµÄË÷Òý¡£ËÑË÷´ÓÖ¸¶¨×Ö·ûλÖÿªÊ¼£¬²¢¼ì²éÖ¸¶¨ÊýÁ¿µÄ×Ö·ûλÖá£
¡¡¡¡²ÎÊý
¡¡¡¡value
¡¡¡¡Òª²éÕÒµÄ Unicode ×Ö·û¡£ ¶Ô value µÄËÑË÷Çø·Ö´óСд¡£
¡¡¡¡startIndex£¨Int32£©
¡¡¡¡¿ÉÑ¡ÏËÑË÷ÆðʼλÖᣲ»ÉèÖÃÔò´Ó0¿ªÊ¼¡£
......

asp.netÖÐÈçºÎ±éÀúHashTable

asp.net±éÀúHashTableÐèÒªÓõ½DictionaryEntry Object£¬asp.net±éÀúHashTable£¬¿ÉÒÔͨ¹ýÈçÏÂÁ½ÖÖ·½·¨À´ÊµÏÖ£¬
·½·¨Ò»£º
foreach (System.Collections.DictionaryEntry objDE in objHasTab)
{
    Console.WriteLine(objDE.Key.ToString());
    Console.WriteLine(objDE.Value.ToString ......

ASP.NET³£ÓõÄÀà

ϵͳÀà
¡¡¡¡TypeÀ࣬ObjectÀ࣬StringÀ࣬ ArrayÀ࣬ConsoleÀ࣬ ExceptionÀ࣬GCÀ࣬ MarshalByRefObjectÀ࣬ MathÀà¡£
¡¡¡¡DateTime½á¹¹£¬Guid ½á¹¹£¬
¡¡¡¡ICloneable½Ó¿Ú£¬IComparable½Ó¿Ú£¬IConvertible½Ó¿Ú£¬ IDisposableÀ࣬
¡¡¡¡¼¯ºÏÀà
¡¡¡¡ICollection½Ó¿Ú£¬IComparer½Ó¿Ú£¬IDictionary½Ó¿Ú¡£IDictionaryEnume ......

¹ØÓÚ ASP.NET Èý²ã¼Ü¹¹

Ò»°ã¶ÔÓÚÓùý ¶¯Èí.net´úÂëÉú³ÉÆ÷µÄÈËÀ´Ëµ£¬Ê¡Á˺öàÊÂÇé¡£  model £¨ÊµÌå²ã£©,  dal£¨Êý¾Ý·ÃÎʲ㣩,  bll£¨ÒµÎñÂß¼­²ã£©
model ¾Í²»ÓÃ˵ÁË dalÊý¾Ý·ÃÎʲãÓеÄʱºòÒªµ÷Óô洢¹ý³Ì£¬ÒÔÇ°ºÜÉÙд£¬¾õµÃ²ÎÊýµÄµ÷ÓÃͦ·Ñ¾¢µÄ£¬´ó¼ÒÓÐʲôºÃµÄ°ì·¨ÄÜÌá¸ß´æ´¢¹ý³ÌÂ𣡣¡£¡£¡£¡£¡£¡£¡£¡£¡ ......

ASP.NETÍøÕ¾¿ª·¢Ð¡½á

1.<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
Vs2005ºìÉ«ÁË£¬ÌáʾÕÒ²»µ½¸ÃÎļþ
ÓÚÊǸÄΪ.<script src="/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
½á¹ûºìɫûÓÐÁË£¬µ«ÊDZàÒëʱ±¨´í£¬ÕÒ²»µ½¸ÃÎļþ
½áÂÛ£º<script src="Script ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ