By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,627 Members | 1,870 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,627 IT Pros & Developers. It's quick & easy.

ModalPopup Extender

P: 132
Hi there.

I am utilising a ModalPopupExtender in my ASP.Net (C#) page, to act as a dialog box so a user can either select from a dropdown list or perform a search for an item.

This all works as required but the overhead in terms of page lag is causing problems. Out of curiosity I have loaded the web page and selected View Source. This has shown that for each dropdownlist within the ModalPopup panels, the respective target data is being cached within the page, hence as you can imagine the html is huge for a commercial database. Also the ViewState is ridiculous looking.

Is this to be expected or are there additional options that I can use to stop the page from loading all the data at runtime? Some suggestions have been to use JavaScript to add functionality with the ModalPopup but I'm not sure what to use in order to stop the Extender from preloading data as such..?

Normally I use the ModalPopupExtender for simple help pages and such, so the text/functionality would be somewhat reduced.
In effect I only want the ModalPopUp data to be evident if/when invoked and not at page load. Failing that, can anybody recommend another way to use a dialog-type control in my web page please?

Just for info, my ModalPopupExtender panel has a TextBox with a Search button and below this a DropDownList of possible values and then an OK button.

Thank you.

Mark :o)
Mar 11 '09 #1
Share this Question
Share on Google+
2 Replies

P: 132
I have stumbled onto "WHY" this is happening. In the Panel that is invoked by the ModalPopup, I am populating the ListBox that is within this panel in the OnLoad event, so hence that is why the data is eveident as is.

I need to work out how to isolate this so that the ListBox is populated only when the ModalPopup is invoked by selecting this via a LinkButton.

If anybody has anything to add on doing this then that will be most welcome, please?

Thank you.

Mark :o)
Mar 11 '09 #2

Expert Mod 15k+
P: 16,027
Since the data comes from the server-side, you will need to use Ajax to populate the list box. Alternatively, you can use an iframe.
Mar 11 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.