public void hidecontrl()
{
StringBuilder sb = new StringBuilder();
sb.Append("<script type=\"text/javascript\">\n");
sb.Append("Sys.Application.add_load(hidebtn);\n");
sb.Append("function hidebtn() {\n");
sb.Append("$('input:imagebutton[id$=imgbtnAnnouncEdit]').hide();\n");
sb.Append("$('input:imagebutton[id$=imgbtnAnnouncDelete]').hide();}\n");
sb.Append("</script>\n");
Page.ClientScript.RegisterStartupScript(Page.GetType(), "Startup", sb.ToString());
}
call hidecontrl(); in whichever function you need.
No comments:
Post a Comment