Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: reference to non-shared object


Message #1 by "Robert Hill" <roberthill@s...> on Fri, 17 May 2002 18:55:21
This is driving me just nuts.

I have a web form. It uses a component to handle SQL reads. I want to trap
errors with a catch and then transfer control to an error handling page.

I cannot figure out how to reference the server.transfer method. No matter 
how I qualify the server reference, I get "reference to a non-shared 
member requires an object reference". I assume this means that somehow I 
have to identify the current instantiation of the web page, but beats me 
how to do it. I have searched help files and .Net books until I am blue in 
the face but can't seem to find the magic words I need.

Any help will be appreciated.

Thanks,
Robert
Message #2 by "Minh T. Nguyen" <nguyentriminh@y...> on Fri, 17 May 2002 11:02:47 -0700
Robert.

	Maybe you don't have the correct capitalization? It should be:

	Server.Transfer("error_page.aspx");

	If this doesn't work, you can always use
Request.Redirect("error_page.aspx");

Hope this works,
Minh.



-----Original Message-----
From: Robert Hill [mailto:roberthill@s...] 
Sent: Friday, May 17, 2002 6:55 PM
To: ASP+
Subject: [aspx] reference to non-shared object


This is driving me just nuts.

I have a web form. It uses a component to handle SQL reads. I want to
trap
errors with a catch and then transfer control to an error handling page.

I cannot figure out how to reference the server.transfer method. No
matter 
how I qualify the server reference, I get "reference to a non-shared 
member requires an object reference". I assume this means that somehow I

have to identify the current instantiation of the web page, but beats me

how to do it. I have searched help files and .Net books until I am blue
in 
the face but can't seem to find the magic words I need.

Any help will be appreciated.

Thanks,
Robert

Message #3 by "Mark Struck" <struckm@a...> on Fri, 17 May 2002 17:17:11 -0500
Robert,

I think this is what you are looking for,

ms-help://MS.NETFrameworkSDK/cpguidenf/html/cpconpassingservercontrolval
uesbetweenpages.htm

Mark

-----Original Message-----
From: Robert Hill [mailto:roberthill@s...] 
Sent: Friday, May 17, 2002 6:55 PM
To: ASP+
Subject: [aspx] reference to non-shared object


This is driving me just nuts.

I have a web form. It uses a component to handle SQL reads. I want to
trap errors with a catch and then transfer control to an error handling
page.

I cannot figure out how to reference the server.transfer method. No
matter 
how I qualify the server reference, I get "reference to a non-shared 
member requires an object reference". I assume this means that somehow I

have to identify the current instantiation of the web page, but beats me

how to do it. I have searched help files and .Net books until I am blue
in 
the face but can't seem to find the magic words I need.

Any help will be appreciated.

Thanks,
Robert


  Return to Index