views:

249

answers:

1

Hi,

I'm using ASP.NET AJAX Control Toolbox in ASP.NET 3.5 webform app; for each item inside a ListView I create a modal popup - through a modal popup extender - containing an image. Is this efficient? I guess that creating multiple popups in the background, just to show some of them is somewhat costly. Inside each popup I use some data from the current item, through Eval calls. If I am to use a single modal popup for the whole ListView, then how could I pass some values to it?

Thanks

+1  A: 

It mostly depends on what you need to do within your popup. But what you could do is to have just one modal popup and pass the data you need as arguments to a JavaScript function you attach to each list item.

You could pass the data exactly as you probably do at the moment, with eval calls.

Juri
silly me.. sending params to JS functions works... thanks.
lmsasu
If this is the accepting answer for you, you should also mark it as such for the others which read your post. Thx.
Juri
Marked as answer. Thanks.
lmsasu

related questions