Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hello, i am making an web application for the university, and in some places, there makes somethings in the DB, then i would like to leave the page like "suspended" and when the job is all done, then i raise an event, and render the data to the page...

 

 

it is this possible???

 

 

thanks!!!

Posted
hello, i am making an web application for the university, and in some places, there makes somethings in the DB, then i would like to leave the page like "suspended" and when the job is all done, then i raise an event, and render the data to the page...

 

 

it is this possible???

 

 

thanks!!!

 

Its not really possible. Web application are not made for asynchronous operations. It is possible to send a request to a database server, but it's not supposed to be used in a web application. The reason is that a web application is suppose to execute a page quickly, render the result to the client, and then free the memory. Suppose you have 200 request at the same time, you absolutely cannot hold the execution for seconds(minuts) since it would cause a memory leak.

 

If you wonder if it is theoriclally possible, the answer is yes. Set the script time out to illimited time, and store all the SQL code inside a stored procedure. Even if the stored procedure takes 5 minutes to execute, IIS will still be waiting for the result in a synchronous operation. But if I was you teacher, I would tell you this is a REALLY REALLY REALLY bad practice and that you should forget about it. :)

Posted

Don't suspend the page. That's bad design. make an asynchronous call to the DB and when the data returns populate your form.

 

You can send asychronous calls to the server. The ability has been around for years but only recently has it caught on. Some people call the technology AJAX :"Asynchronous JavaScript and XML".

 

Here's some reference material:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/lifewithoutrefresh.asp

http://www.adaptivepath.com/publications/essays/archives/000385.php

 

And to see it in action check out Google's "suggest" feature.

http://www.google.com/webhp?complete=1&hl=en

 

The suggestions are provided via an asychronous call to a server.

Posted
Don't suspend the page. That's bad design. make an asynchronous call to the DB and when the data returns populate your form.

 

You can send asychronous calls to the server. The ability has been around for years but only recently has it caught on. Some people call the technology AJAX :"Asynchronous JavaScript and XML".

 

Here's some reference material:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/lifewithoutrefresh.asp

http://www.adaptivepath.com/publications/essays/archives/000385.php

 

And to see it in action check out Google's "suggest" feature.

http://www.google.com/webhp?complete=1&hl=en

 

The suggestions are provided via an asychronous call to a server.

 

yes, i have seen javascript rpc, but its a little difficult... but im in practice!!! thanks a lot!!!

Posted
Don't suspend the page. That's bad design. make an asynchronous call to the DB and when the data returns populate your form.

 

You can send asychronous calls to the server. The ability has been around for years but only recently has it caught on. Some people call the technology AJAX :"Asynchronous JavaScript and XML".

 

Here's some reference material:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/lifewithoutrefresh.asp

http://www.adaptivepath.com/publications/essays/archives/000385.php

 

And to see it in action check out Google's "suggest" feature.

http://www.google.com/webhp?complete=1&hl=en

 

The suggestions are provided via an asychronous call to a server.

 

Thanks so much for the knowledge sharing...I knew about using hidden frames to do something similiar but I didn't know about this XML version...no one in our group had even heard of that technique...wonder why it's been kept so quiet?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...