linkButton弹出删除窗口

<asp:LinkButton ID="LinkButtonDelete" runat="server" CausesValidation="false"   CommandArgument = '<%# Eval(ToAttributeName(Assessment.Meta.ID)) %>' OnCommand="lbtnDeleteAssessmentItem_Command" OnInit="lbtnDelete_Init" Text="删除"></asp:LinkButton> 

 

  protected void lbtnDelete_Init(object sender, EventArgs e)
    {
        (sender as LinkButton).Attributes.Add("onclick", string.Format("javascript:return confirm('{0}');", "确定要删除当前记录吗?"));
    }

posted @ 2008-09-15 15:16  不染丹心  阅读(401)  评论(0编辑  收藏  举报