获取PagerTemplate内的控件

if (e.Row.RowType == DataControlRowType.Pager)
        
{
            Button btn 
= (Button)(e.Row.FindControl("btnDel"));
            
if (btn != null)
            
{
                btn.Attributes.Add(
"onclick""return confirm('确定删除吗?')");
            }

        }
原文地址:https://www.cnblogs.com/wbcms/p/1063961.html