Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Window

Status
Not open for further replies.

rsshetty

Programmer
Dec 16, 2003
236
US
Hello,

I have a rather tricky problem and I have run out of ideas.

I have a page with a datalist that has checkboxes in it. At the bottom of the page, I have an imagebutton (not part of the datalist). When the imagebutton is clicked, I need to find out the checkboxes selected by the user, add it to a session object and open a new window.

How will I be able to accomplish this?

Using client side scripting along with a server side code results in the client side executing first. My window opens before I can update my session.

Help!

Thanks.

rsshetty.
It's always in the details.
 
You'll have to :

1) post the page back to the server
2) read which checkboxes were selected
3) register a function on the page to open the new window (have a look as RegisterStartUpScript for an exampel on how to do this).

You may even be able to use querystring values when opening the pop up window which would remove the need for session variables.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Would it be possible to indicate where I'd have to use the RegisterStartUpScript? Page_Load?

As of now I am capturing the list of checkboxes checked in the imagebutton_click event handler.

The flow of control is as follows:

Select Checkboxes -> Click imagebutton -> page_load -> imagebutton_click

Step 2 and 3 in your post are not in order for me.

Thanks

rsshetty.
It's always in the details.
 
I'm guessing there is not way of accomplishing this without the page refresh.

rsshetty.
It's always in the details.
 
If you want to set session variables then you have to go back to the server to set them. There is no way around that although you could use an AJAX method to avoid a full page refresh.

Alternatively, if you don't need session variables you could do all the checks client-side and pass the values to the pop-up page as querystring variables.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top