在CS文件中控制页面控件的显示与否
页面部分代码:
<tr id="tdCreateDate" style="display: none">
<td nowrap align="left" contenteditable="">
创 建 人:</td>
<td contenteditable="">
<asp:TextBox ID="w_CreateOpt" runat="server" size="25" value="" ReadOnly></asp:TextBox></td>
<td nowrap align="left" contenteditable="">
创建时间:</td>
<td colspan="2" valign="top">
<asp:TextBox ID="w_CreateDate" runat="server" ></asp:TextBox><a href="javascript:showCalendar('imgNodeValidDate',false,'w_CreateDate',null,'',0);"> <img id="imgNodeValidDate" border="0" src="/CIMS/public/images/calendar_dropdown.gif"></a>
</td>
</tr>
cs 文件中动态控制控件显示代码:
ClientScript.RegisterStartupScript(this.GetType(), "Refresh1", "<script>document.all.tdCreateDate.style.display = \"None\";</script>");

浙公网安备 33010602011771号