页面加载后CheckBoxList重置 [英] CheckBoxList is getting reset after page load

查看:128
本文介绍了页面加载后CheckBoxList重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

当用户单击GridView中的一行时,我在运行时将项目添加到CheckBoxList.

出现一个弹出式弹出屏幕,其中包含一个在文件后面的代码中设置的复选框.在用户单击情绪弹出窗口上的按钮后,选择至少一个复选框将完成操作.

但是问题是当用户选择并单击文件后面代码中的弹出屏幕按钮时,我正在检查该CheckBoxList中是否没有项目来检查用户选中了哪个项目.

帮助我解决此问题..我认为一旦发回邮件,CheckBoxList不会被清除..

Hi All,

I am adding items to CheckBoxList on runtime.. when user clicks on a row in GridView.

a moodal popup screen will appear which contains a checkboxes set in code behind file. after user clicks a button on moodal popup screen selecting atleast one checkbox that action will completed.

But the problem is when user selects and click on the popup screen button in code behind file i am checking there are no items in that CheckBoxList to check which item user checked.

help me in this issue.. as i am thinking CheckBoxList will not get cleared once post back happens..

推荐答案

请使用
if(!page.ispostback)



问候
Sebastian

in pageload while you are filling your items

Regards
Sebastian


我没有将CheckBoxList保留在运行时将数据加载到其中,而是将其放置在普通网页上.

在复选框列表中选择项目后,用户需要单击提交"按钮.
Instead of keeping CheckBoxList to which data loads at runtime, i placed on normal web page.

After selecting the items in checkbox list user needs to click on submit button.


这篇关于页面加载后CheckBoxList重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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