0

Currently I'm working on a project that requires me to make a ASP.NET page that contains schedules. The whole page schedules a week in total. Every day is represented by a table (in an updatepanel) that has rows for hours and columns for auditoriums. The auditoriums are the places where the scheduled events will take place. By filling up the cells I'm creating a quick and handy overview for the user.

I've added some nice tools from the ajax control toolkit, like the Modal popup for quickly adding events and the popupcontrols so that every cell (and the button inside it capturing the click) can show some possible actions/functionality to the user.

I'm generating everything on the fly, just so you guys know.

Because every hour or row contains 2 cells for every half hour, and there are possible between 2 and 10 auditoriums per day, that means that for each button there needs to be a panel containing the buttons and a Popupcontrol that connects to button to the panel. For every day there will be about 390 controls generated per day. That takes a very long time and this application needs to be performant.

To make this all performant, I'm trying to use threads. This makes me gain a few seconds but not enough. I'm thinking, I don't need to generate a new panel that pops up the controls for every button/cell in the day overview. Just one panel, a popupcontrol for every button and that's it. That will save me some loading time and it'll be much more performant.

My question is the following: Is there any way to detect which popupcontrol has been activated and shows the panel on my screen. If that would be possible, it would help me very much.

And other suggestions are welcome, I'm open to them, fire away!

Philip Gullick
  • 987
  • 6
  • 22
Sander Vanhee
  • 67
  • 2
  • 8

1 Answers1

0

You could use javascript to set a hidden control a value when the user clicks your button. You can then use that value to determine which button was used to open the panel.

Skye MacMaster
  • 848
  • 1
  • 8
  • 14
  • That is one option, but I want to do it the correct way, is there no method or anything that I can call so I can determine which button activated the Popupcontrol? – Sander Vanhee May 03 '13 at 14:03
  • The documentation [link](http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/PopupControl/PopupControl.aspx) doesn't indicate there's a function you can call to get this. I kinda' doubt this extender would store this information. So using a hidden control may be the best option. – Skye MacMaster May 03 '13 at 14:20