IE Browser and ASP.NET

  • Thread starter Thread starter david
  • Start date Start date
D

david

(1) How do I update the IE browser's status bar from
within an ASP.NET web application?

(2) How can I capture the event of closing the IE browser
from within an ASP.NET web application?

(3) How can I suspend any activity - disable accepting
keyboard or mouse clicks on a web page until the client
request is processed by an IIS server.

Thanks.
 
david said:
(1) How do I update the IE browser's status bar from
within an ASP.NET web application?

You send a client-side script down to the browser and use the window.status
property.
(2) How can I capture the event of closing the IE browser
from within an ASP.NET web application?

You send a client-side script down to the browser and use the window.close
method.
(3) How can I suspend any activity - disable accepting
keyboard or mouse clicks on a web page until the client
request is processed by an IIS server.

This one is a bit more tricky. You could redirect the browser to another
page upon submission (server.execute or server.transfer or
response.redirect), but you can't suspend client events.

The bottom line is that if you want to affect the browser, you must do so at
the client level and this means with client-side script.
 
-----Original Message-----



You send a client-side script down to the browser and use the window.status
property.


You send a client-side script down to the browser and use the window.close
method.


This one is a bit more tricky. You could redirect the browser to another
page upon submission (server.execute or server.transfer or
response.redirect), but you can't suspend client events.

The bottom line is that if you want to affect the browser, you must do so at
the client level and this means with client-side script.



.

I've created a VB function called cs_StatusBar() as
follows...

Private Sub cs_StatusBar()
If Not IsClientScriptBlockRegistered( key := "csSB" )
then
Dim scriptString as String = "<script
language=JavaScript>"
scriptString += "function UpdateSB( StatusTxt )"
scriptString += "{window.status=StatusTxt;}"
scriptString += "</script>"

RegisterClientScriptBlock( key := "csSB", script :=
scriptString )
End If
End Sub

I've registed the client-side script as follows...

Private Sub Page_PreRender(ByVal sender As Object, ByVal e
As System.EventArgs) Handles MyBase.PreRender
cs_StatusBar() '' register cs script
End Sub

Is there anyway to dynamically call this script from VB
ASP.NET web form code?

ex: If i'm loading some data, after despressing a "load"
button - I'd like to update the status bar. Then when
complete, reset the status bar message to "done".

Any suggestions!
 
Back
Top