回发时未获取占位符下的复选框列表

编程入门 行业动态 更新时间:2024-10-24 16:27:59
本文介绍了回发时未获取占位符下的复选框列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我有一些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.

更多推荐

回发时未获取占位符下的复选框列表

本文发布于:2023-10-12 23:21:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1486174.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:复选框   列表   回发时未

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!