• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

Stop execution during Page_Load() event

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
Response.write("Hello")
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.


0
syswareinc
Asked:
syswareinc
  • 2
2 Solutions
 
Michel PlungjanIT ExpertCommented:
The response write has executed when the html was sent to the browser.
You can delay the RENDERING but not the execution
0
 
Michel PlungjanIT ExpertCommented:
So in JS it would be

<script>
function myLoad() {
  var res = showModalDialog(...);
  document.getElementById('someDiv').innerHTML='The result from the dialog is '+res
}
window.onload=myLoad;
</script>

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

0
 
DropZoneCommented:
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.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now