ASP.NET(C#)³£ÓôúÂë30Àý
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.zoesan.com By Error 302777528תÔØÇë×¢Ã÷³ö´¦
ÒÔÉÏvbÓõ½Ö¸Õë¼¼Êõ²éÕÒ×Ö·û´®Óëc#Ò»°ãµÄ.indexof()²éÕÒÏà±È½Ï£¬Ã÷ÏÔ¿´³öË¿ìËÂý¡£
VB:
Option Explicit
'Ö¸Õë·½·¨²Ù×÷×Ö·û´®
'CopyÒ»¸ö×Ö·û´®µ½»º´æÖÐ
Public Declare Function GetTickCount Lib "kernel32" () As Long
Public ......
½ñÌìÔÚ×öÒ»¸öÎÞË¢ÐÂÅжϹ«Ë¾Ãû³Æ£¬ÊÇ·ñÖظ´µÄʱºò£¬·¢ÏÖÒ»¸öÎÊÌâ¾ÍÊÇͨ¹ýjavascript´«µ½asp.netÒ³ÃæµÄÖµÊÇÂÒÂë¡£ÒÔǰûÓз¢ÏÖ¡£ÒòΪ ÒÔÇ°×ö²âÊÔʱ£¬¶¼ÊÇÓÃÓ¢ÎÄ×Ö·û½øÐеIJâÊÔ¡£½ñÌìÊäÈ뺺×ֺ󣬷¢ÏÖÓÐÕâÖÖÎÊÌâ¡£¸Ð¾õ¿ÉÄÜÊDZàÂëµÄÎÊÌâ¡£¾ÍÉÏÍø²éÁËһϡ£ÕÒµ½Ò»Ð©·½·¨£¬ÈçÏ£º
1.ÉèÖÃweb.configÎļþ
<system.web>
&l ......
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MSXML2;
using System.Text.Regula ......
1. INTRODUCTION
´óÁ¿µÄÍøÕ¾Ò³ÃæÊDzÉÓö¯Ì¬µÄ·½Ê½£¬¸ù¾ÝÓû§Ìá½»µÄ²»Í¬ÇëÇó´´½¨Éú³ÉÒ³Ãæ¡£ÕýÈçÎÒÃÇËùÖªµÄ£¬¶¯Ì¬Ò³ÃæÓÐÖúÓÚ¸ù
¾ÝÓû§ÒªÇóÀ´Ìṩ¶¨ÖƵĶ¯Ì¬ÄÚÈÝ¡£¶¯Ì¬Ò³ÃæÒ²ÀûÓÚ»ñÈ¡ÔÚÊý¾Ý¿âÖÐÿʱÿ¿Ì¸üеÄ×ÊÁÏ¡£È±µãÊÇΪÿ¸öÓû§ÇëÇóÉú³ÉͬһҳÃæÔö¼ÓÁËϵͳ¿ªÏú¡£
ASP.NET
ÌṩÁË»º´æ¼¼ÊõÓ ......
²»ÒªÊ¹Óò»±ØÒªµÄSession£¬ºÍASPÖÐÒ»Ñù£¬ÔÚ²»±ØÒªµÄʱºò²»ÒªÊ¹ÓÃSession
²»Ê¹Óò»±ØÒªµÄServer Control
²»Ê¹Óò»±ØÒªµÄViewState
²»ÒªÓÃException¿ØÖƳÌÐòÁ÷³Ì
½ûÓÃVBºÍJscript¶¯Ì¬Êý¾ÝÀàÐÍ
ʹÓô洢¹ý³ÌÍê³ÉÊý¾Ý·ÃÎÊ
Ö»¶ÁÊý¾Ý·ÃÎʲ»ÒªÊ¹ÓÃDataSet
¹Ø±ÕASP.N ......