【发布时间】:2015-12-11 19:42:23
【问题描述】:
Im trying to hide and show a row from selection index from a drop down and im 使用 ajax 更新面板在该行中显示一些复选框。
当我试图隐藏该行时,我的代码是
trOptions.Attributes.Add("style", "display : none ; ");
我分配给表格行的 troptions 和 id 在哪里
<tr id="trOptions" runat="server" >
我不知道t know why it doesnt 了解风格?
更新 我的代码的同一部分中也有一个属性命令,它实际上可以工作
checkboxlist.Enabled = false;
但是这个正在使用 asp.net 控制属性。
我什至试图像这样用 jquery 隐藏该行
function HideControl() {
jQuery("#trOptions").hide();
};
在后面的代码中
ClientScript.RegisterClientScriptBlock(this.GetType(), "blah", "HideControl();", true);
我 dont know why its 不工作,是因为我正在使用脚本管理器进行 ajax 并且我手动添加脚本到我的页面 >
【问题讨论】: