ModalPopup Extender

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • E11esar
    New Member
    • Nov 2008
    • 132

    ModalPopup Extender

    Hi there.

    I am utilising a ModalPopupExten der 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 ModalPopupExten der 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 ModalPopupExten der 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)
  • E11esar
    New Member
    • Nov 2008
    • 132

    #2
    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)

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      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.

      Comment

      Working...