DIV在PostBack上改变状态 [英] DIV Changes State on PostBack

查看:96
本文介绍了DIV在PostBack上改变状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据搜索网页,其中包含不同类别客户搜索选项的部分。为了节省空间,我试图将每个部分包装在div中,以便用户可以根据需要显示或隐藏搜索选项。我的问题是,当搜索发布
时,div会恢复为默认状态。

I have a data search webpage with sections for different classes of customer search options. To conserve space I'm trying to wrap each section in a div so the user can show or hide the search options as desired. My problem is that when a search posts back the div reverts to its default state.

这几乎是可以接受的,除了我使用复选框和javascript控制div的显示。选中后,将显示div并检查/显示我的默认值。

This would almost be acceptable except I control display of the div using a checkbox and javascript. When checked the div is displayed and my default is checked/displayed.

如果我的状态未被选中/未显示,则回发时,div将恢复为默认(显示),但复选框仍未选中。有没有办法让div不以这种方式回复,或者让复选框以同样的
方式回复?

On postback if my state is not-checked/not-displayed the div will revert to default (displayed), but the checkbox remains unchecked. Is there any way to keep the div from responding in this manner or alternatively, get the checkbox to respond in the same manner?

如果这不是相应的论坛请指引我找一个更好的人。

If this isn't the appropriate forum please direct me to a better one.

David M. Nichols合同软件工程师

David M. Nichols contract software engineer

推荐答案

可能ASP.NET论坛会更好,但复选框和div的所有服务器控件?或者它们只是标准的HTML控件?
Probably the ASP.NET forums would be better, but are the checkboxes and div's all server controls? Or are they just standard HTML controls?


这篇关于DIV在PostBack上改变状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆