回发时未获取占位符下的复选框列表 [英] Not Gettin CheckBox List under Placeholder when postback

查看:75
本文介绍了回发时未获取占位符下的复选框列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一些CheckBoxLists的表单.我必须根据某些条件使它们可见和不可见.当我将CheckBoxLists保留在诸如PlaceHolder之类的服务器控件中时,当页面为PostBack时,我没有得到CheckBoxLists.如何保持CheckBoxLists的状态.

在此先感谢..

解决方案

如果使它们在服务器上不可见,则它们将不存在于客户端上.遇到这样的问题时,我将在页面上放置一个隐藏的控件,并将所需的数据存储为字符串(可能是XML),从而不管我的视图状态中有哪些其他控件,都可以跟踪我的数据.

Hi all,

I have a form with some CheckBoxLists. I have to make them visible and invisible based on some condition. When I keep the CheckBoxLists inside a server control like PlaceHolder, Im not getting the CheckBoxLists when the page is PostBack. What to do to keep the state of CheckBoxLists.

Thanks in advance..

解决方案

If you make them invisible on the server, they won''t exist on the client. When faced with issues like this, I would place a hidden control on my page, and store the data I needed as a string, perhaps XML, and thus keep track of my data regardless of what other controls were in my viewstate.


这篇关于回发时未获取占位符下的复选框列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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