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

JavaScriptÅжÏÎÊÌâ¡£¡£¡£ - .NET¼¼Êõ / ASP.NET

protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
  {
  string strMsg = "ÄãÈ·¶¨ÒªÉ¾³ýÂð£¿";
  int flag = 0;
  Response.Write("<Script Language='JavaScript'>if ( window.confirm('" + strMsg + "')) { "+(flag = 1)+"} else {" +(flag = 0) +"};</script>");
  if (flag == 0)
  {
  e.Cancel = true;
 
  }

  }

ÎÒÏëÔÚgridviewÖеãɾ³ýʱ¡£µ¯³ö¶Ô»°¿òÅжÏÊÇ·ñɾ³ý£¿È»ºó¿´ÊÇ·ñÖ´ÐвÙ×÷¡£¡£ÎªÊ²Ã´¾ÍÊDz»ÐÐÄØ
C# code:

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[5].Attributes.Add("onclick", "return confirm('ÄãÈ·¶¨ÒªÉ¾³ýÂð£¿')");

}
}
//Cells[5]Õâ¸ö¶ÔÓ¦ÄãµÄɾ³ý¿Ø¼þËùÔÚµÄÀ¸Î»Ë³Ðò



ÄãµÄɾ³ýÊÇʹÓõÄcommandfield»¹ÊÇtemplatefield£¬×îºÃÄÜÌù³ö´úÂë¡£

ΪʲôҪResponse.Write£¿

ΪʲôҪe.Cancel=true£¿

Ë¿ºÁ¿´²»³öµÀÀí¡£

ÄãÕâ¾äÖеÄjsûÓзµ»Ø¿Í»§¶Ë£¬ÈçºÎÖ´ÐУ¿

=============

1Â¥Õý½â

ÏȲ»ËµÎªjavascript²»Ö´ÐÐ.

Ä㾹Ȼ°Ñ¿Í»§¶ËjavascriptµÃµ½µÄflag = 0/1 Ö±½Ó¸³Öµ¸øÁ˺ǫ́µÄC#´úÂëÖеÄflag±äÁ¿?


Ïà¹ØÎÊ´ð£º

asp.net³ÌÐòÔ±ÇóÖ° - .NET¼¼Êõ / ·Ç¼¼ÊõÇø

±¾È˹¤×÷¾­ÑéÒ»ÄêÒÔÉÏ
ÊìϤasp.net
ÊìϤjavascript
ÊìϤCss
ÊìϤajax
ÊìϤsqlserver2005
ÓÐÒ»ÄêµÄÏîÄ¿¾­Ñé
¾ßÌåÏîÄ¿ºÍÆäËûµÄ¾Í²»ÔÚÕâдÁË
ÓÐÒâÕßÁªÏµ£º
QQ:359233910
ÒýÓÃ
±¾È˹¤×÷¾­ÑéÒ»ÄêÒÔÉÏ
ÊìϤasp ......

ÇóÖú£ºÕÒASP.NETÍøÒ³ÖÆ×÷¸ßÊÖ£¬Óб¨³ê¡£

±¾ÈËÊDzËÄñÒ»¸ö£¬Æ½Ê±Òª×öÉúÒ⣬µ«ÊÇÕÒÁ˺ܶàÈË×öÍøÕ¾£¬¾ù±»Æ­ÁË¡£×öµÃ²»Èý²»ËÄ£¬ÏÖÔÚ¾öÐÄ×Ô¼ºÀ´×öÒ»¸ö£¬ÒÑѧϰASP.NETÏà¹ØµÄÍøÒ³ÖÆ×÷֪ʶ£¬ÓÐDW»ù´¡£¬¿ÉÒÔ˵ÊÇÄ¿Ç°Ö»ÓÐÀíÂÛ֪ʶ£¬µ«ÊÇÔÚʵ¼Ê¾ßÌå²Ù×÷µÄʱºò£¬×ÜÊÇÓöµ ......

ASP.NETÏà¹Ø¼¼Êõ - .NET¼¼Êõ / ASP.NET

¸÷λ´óÏÀ£¬ÎÒѧϰµÄÊÇASP.NET£¬ÏëÖªµÀÏà¹Ø¼¼ÊõÓÐÄÄЩ£¬¾ÍÏñJAVA EEÖÐÓÐstruct sping jsp severlet µÈ£¬ASP.NET»¹ÓÐÄÄЩЩÏà¹Ø¼¼Êõ¡£
http://topic.csdn.net/u/20090914/21/af27de99-f0f3-4cfd-9379-13764f8ec6b1.ht ......

js¿ØÖÆasp¿Õ¼ädropdownlist - .NET¼¼Êõ / ASP.NET

ÎÒÓÐÁ½¸ödropdownlist¶¼°óºÃÁËÖµ£¬ÏëÑ¡ÖÐÒ»¸ödropdownlistÖеÄÖµ£¬È»ºóÔÚÁíÒ»¸ödropdownlistÖÐÑ¡ÖÐÏàÓ¦µÄÒ»Ïî¡£
²»ÊÇ´Óа󶨵ڶþ¸ödropdownlist£¬ÊÇÔÚÒѾ­°óºÃµÄÖµµ±ÖÐÑ¡ÖÐÒ»¸ö¡£
ÎÒÏëÓÃjsд
ÇóÖú
Äã¿ÉÒÔ°Ñdrop ......

asp.net ¶þ²æÊ÷ treeview - .NET¼¼Êõ / ASP.NET

O O O O O O
  |.......| |........| |.......|
  | | |
  O O ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ