((LinkButton)(e.Row.Cells[5].Controls[0])).Attributes.Add("onclick","return confirm('你确认删除吗?');");
错误提示:Specified argument was out of the range of valid values.
Parameter name: index
错误提示:Specified argument was out of the range of valid values.
Parameter name: index
括号引起的问题,修改之后建议先检查一下e.Row.Cells[5]里有几个控件,如果不是只有一个且第一个控件不是LinkButton的话还是会错的