且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从弹出窗口向列表框中添加值

更新时间:2023-12-06 11:19:16



有三种方法可以解决此类问题.

一种方法.

通过使用ASP.NET的CrossPostBack功能,可以将一个aspx页面数据传递到另一页面.

通过ASP.NET中的CrossPostBack函数

http://msdn.microsoft.com/en-us/library/ms178139.aspx [ ^ ]

http://www.c-sharpcorner.com/UploadFile/DipalChoksi/xpgpostbk_asp2_dc08102006235543 /a> [ ^ ]

第二种方式.

不必在另一页中显示带有复选框的gridview,而是将其显示在同一页面中.通过单击gridview中选定项目的添加按钮,您可以将这些项目直接添加到同一页面本身的列表框中.

第三条路.

通过使用Session概念.

您可以将选中的复选框项放入会话中,然后在列表框页面中使用该会话变量.

http://www.codeproject.com/KB/aspnet/state_management_intro.aspx [ ^ ]


以上技术人员将解决您的问题.

如果您对此不满意,请告诉我.

问候,
Kiran.
Hi,

There are three ways to do this kind issues.

One Way.

By using CrossPostBack functionality of ASP.NET,you can pass the one aspx page data to another page.

Go through the CrossPostBack function in ASP.NET

http://msdn.microsoft.com/en-us/library/ms178139.aspx[^]

http://www.c-sharpcorner.com/UploadFile/DipalChoksi/xpgpostbk_asp2_dc08102006235543PM/xpgpostbk_asp2_dc.aspx[^]

Second Way.

Instead of displaying gridview with checkbox in another page,display it in same page.By clicking add button for selected items in gridview,you can directly add those items to listbox in the same page itself.

Third Way.

By using Session concept.

you can put the selected check box item in session,then use that session variable in listbox page.

http://www.codeproject.com/KB/aspnet/state_management_intro.aspx[^]


The above technies will solve your issue.

Still if you are not happy with this,let me know.

Regards,
Kiran.


如果您在弹出式表单中使用控件时遇到问题,请参考此链接-
使用弹出式表单中的控件 [ ^ ]
If you come across issues working with controls inside a popup form, then refer to this link -
Working with controls inside a pop-up form[^]