为GridView-Delete列添加确认对话框
给Delete列添加确认对话框最简单的方法是把CommandField的DeleteText属性设置为:
 <div onclick="JavaScript:return confirm('Are you sure to delete?')">Delete</div>
<div onclick="JavaScript:return confirm('Are you sure to delete?')">Delete</div> 加入div后会产生换行效果,若不想要换行效果可以使用span:
 <span onclick="JavaScript:return confirm('Are you sure to delete?')">Delete</span>
<span onclick="JavaScript:return confirm('Are you sure to delete?')">Delete</span> 了解更多:http://www.cnblogs.com/doraeimo/archive/2007/01/01/609344.html
 
                    
                 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号