如何在asp.net中维护复选框选中的值(跨页面) [英] How to maintain check box selected values(across pages) in asp.net

查看:68
本文介绍了如何在asp.net中维护复选框选中的值(跨页面)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个asp.net网格视图,其中有一个按钮字段作为列。点击该字段后,我打开一个页面(如弹出窗口),显示一些详细信息(网格视图),复选框为用户可以选择少数或所有记录(客户详细信息)的列之一,因此当用户关闭此项时页面我想将这些选定的客户传递到主页面,如果他打开弹出页面我想要检查网格中先前选择的值。我怎样才能以最好的方式实现这一目标,从而降低成本。我正在考虑会话中的数组列表,我不确定这是最好的方法。请指导我,谢谢。

Hi All,

I have a asp.net grid view with a button Field as a column in it. On click of that field I am opening a page(like pop up) displaying some details(Grid view) with check box as one of the column in which user can select few or all records(customer details), so when the user closes this page I want to pass these selected customers to main page and again if he opens the pop up page I want to check the previously selected values in the grid. How can I achieve this in the best possible way, which costs us less. I am considering Array list in Session which I am not sure is the best way. Please guide me thank you.

推荐答案

如果您使用window.open或showmodaldialog打开模态,则使用页面或窗口参数将选定的ID传回后面,将第四个传递给父级页面。



如果是打开对话框的jQuery或JavaScript插件,则将所选值存储在json中以保持选择。
If you are opening modal using window.open or showmodaldialog then use page or window arguments to pass selected id's back and fourth to the parent page.

If it is jQuery or JavaScript plugin to open the dialog, then store selected values in json to maintain selection.


这篇关于如何在asp.net中维护复选框选中的值(跨页面)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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