Click here to Skip to main content
16,015,755 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In one page I a have list box and on one button click I am showing a popup which is another aspx page.

In that page I'm showing one grid with check box

Now I want that when the user selects check boxes and click on add button selected items should gets added to list box on page when I click save button on page(not popup) all the records in that list box should gets saved to data base how to do this.
Posted
Updated 8-Nov-10 1:02am
v2

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.
 
Share this answer
 
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[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900