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 a new 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.
 
I assume this is a web app since your talking about session and client/server exection. if so this is better suited for the asp.net forum.

don't worry many people assume that since they use c# all programming questions should be posted here. this form is more of GUI egnostic issues.

on to your problem. do you need to have new window(s) pop up. this is generaly considered bad design. I have/do use this feature to display reports so the user can open multiple reports at the same time. other than that it's either DHTML or page redirect.

If your datalist has a unique identifier I would set the checkbox value to this unique id. I would then add a client click event to the image button.

the client event would fire a javascript event which cycles through the datalist looking for checkboxes. if the checkbox is checked get the value and append it to a string.

once the cycling is complete call window.open(); pass in the appropiate argurments including the url with querystring values.

you could use a simple HTML image link/button instead of an asp:imagebutton in this scenario since you won't have any code behind.

If you need more help with this either the javascript forum or asp.net forum would be the best place for assistance.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thank you. I will post in the ASP.NET forum.


rsshetty.
It's always in the details.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top