复制代码 代码如下:
<asp:HyperLinkField DataNavigateUrlFields="id" DataNavigateUrlFormatString="HospitalView.aspx?id={0}" DataTextField="id" DataTextFormatString="取消" HeaderText="取消" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="60" ItemStyle-Width="60" />
<asp:CommandField ShowDeleteButton="True" DeleteText="删除" HeaderText="删除" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="60" ItemStyle-Width="60" />
复制代码 代码如下:
e.Row.Cells[6].Attributes.Add("onclick","return confirm ('您确认要取消吗? ')");
e.Row.Cells[7].Attributes.Add("onclick","return confirm ('您确认要删除这条数据吗? ')");
复制代码 代码如下:
((HyperLink)e.Row.Cells[6].Controls[0]).Attributes.Add("onclick","return confirm ('您确认要取消吗? ')");
((LinkButton)e.Row.Cells[7].Controls[0]).Attributes.Add("onclick","return confirm ('您确认要删除这条数据吗? ')");
新闻热点
疑难解答
图片精选