我现在页面有这样一个总局
panel1 panel2panel3 panel4(updatepanel)
在updatepanel里面有一个buttom,我点这个buttom我要把panel4隐藏掉
我应该注册这个脚本啊
panel1 panel2panel3 panel4(updatepanel)
在updatepanel里面有一个buttom,我点这个buttom我要把panel4隐藏掉
我应该注册这个脚本啊
一:如果你的button是服务器控件,那么在它的click时间中,
直接使用服务器代码
panel4.Visible = false;
就可以了
二:如果你的button是客户端的,
那么也直接在他的click中使用
document.getElementByID(panel4).style.display = "none";
三:如果你是想通过点击button(服务器端)来向客服端注册一段JS代码
那么使用:
ScriptManager.RegisterClientScriptBlock("updatepanel",this.GetType(),"hide","客服端要执行的的方法",true)
这样也可以
楼主可以试试
我不知道楼主具体想如何实现
所以列举了一些
document.getElementById("<%=updatepanel1.ClientID%>").dispaly="none";
//或者document.getElementById("<%=updatepanel1.ClientID%>").visibility="hidden";
}