dotnet Reference to non-shared member requires object reference - Global.asax.vb 
Author Message
 dotnet Reference to non-shared member requires object reference - Global.asax.vb

I am getting the following error as I attempt to
Imports System.Web.UI.Page
to the Global.asax.vb page

Error Message:
Reference to a non-shared member requires an object reference.

I am trying to use the method
RegisterClientScriptBlock()
inside the Application_Error() Sub

Can anyone help me?

  Thanks in Advance!!



Wed, 14 Sep 2005 00:45:02 GMT  
 dotnet Reference to non-shared member requires object reference - Global.asax.vb
Inside the Application_Error sub there would not be a page to reference.
RegisterClientScriptBlock() is used to send script down to the browser, and
there is not a browser attached to the Global.asax file because it runs with
the Application and session.  So because Page has not been instantiated like
it is when you use it in a WebForm, you cannot use that function in
Global.asax.

HTH.
Ben.

--
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> I am getting the following error as I attempt to
> Imports System.Web.UI.Page
> to the Global.asax.vb page

> Error Message:
> Reference to a non-shared member requires an object reference.

> I am trying to use the method
> RegisterClientScriptBlock()
> inside the Application_Error() Sub

> Can anyone help me?

>   Thanks in Advance!!



Wed, 14 Sep 2005 23:48:42 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. reference to a non-shared member requires an object reference

2. Reference to a non-shared member requires an object reference

3. Reference to a non-shared member requires an object reference

4. Reference to non-shared member

5. I don't understand the error message: "Reference to a non-shared member requires an object reference" in a class

6. I don't understand error message "Reference to non-shared member requires an object reference"

7. Does VB Hold An Extra Reference To A Global Object

8. Passing an object reference by reference where the object has a default property

9. global.asa and global.asax ?

10. Referencing global ActiveX object in other pages

11. programmatically referencing non-form objects

12. Requires Object Reference????

 

 
Powered by phpBB® Forum Software