Stop execution during Page_Load() event

Posted on 2007-07-30
Last Modified: 2013-11-26
I have ASP.NET application.
I wan to open the Modal dialoguebox while my page loads and I want the rest of code excutes in page load event..when i close the modal dialogue box. for example as below
sub Page_Load()
some code...
Open dialogue box
End sub

I want Respons.write shoud execute after i close the dialogue box.

Is it possible...? and yes how?? I know its possible if i write inline code..but i don't want to do that.

Plz help.

Question by:syswareinc
    LVL 75

    Accepted Solution

    The response write has executed when the html was sent to the browser.
    You can delay the RENDERING but not the execution
    LVL 75

    Expert Comment

    by:Michel Plungjan
    So in JS it would be

    function myLoad() {
      var res = showModalDialog(...);
      document.getElementById('someDiv').innerHTML='The result from the dialog is '+res

    <div id="someDiv"></div>

    LVL 18

    Assisted Solution

    What you ask is not possible.  The way that an ASP.NET web application (and any other web site) works is by receiving a request from the browser, processing it, and sending a response back.  This means that by the time you are rendering the page on the browser, the server already finished processing.

    However, what you want to do could be accomplished in other ways.  You can set up a modal dialog box on your site that when clicked, it causes an event to be triggered at the server, which in turn will perform an appropriate action.

    If you offer more details as to what you want to accomplish, we'll be able to help better.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    A Change in PHP Behavior with Session Write Short Circuit ( (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
    Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
    Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now