Current location: Hot Scripts Forums » Programming Languages » ASP.NET » How can I create an explicit instance of a class?


How can I create an explicit instance of a class?

Reply
  #1 (permalink)  
Old 03-21-07, 11:46 AM
DonLindon DonLindon is offline
Newbie Coder
 
Join Date: Oct 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
How can I create an explicit instance of a class?

Hi my program won’t let me create a session, application, or cache variable. It also won’t allow me to do this:

ASP Code:
  1. Response.Redirect("default.aspx?question=1")
  2. Dim num As String = Request.QueryString("question")

In all cases, I get the message: You cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class.

My question is how can I create an explicit instance of one of these classes?

Thanks for any help.

Last edited by UnrealEd; 03-21-07 at 12:47 PM. Reason: please use [highlight=ASP] wrappers when posting ASP, even when there's little code
Reply With Quote
  #2 (permalink)  
Old 03-21-07, 05:02 PM
koncept
Guest
 
Posts: n/a
can you post the code you have currently?

typicaly you would use
asp Code:
  1. sub page_load(appropriate stuff here that i dont remember off hand)
  2. 'your code here
  3. end sub
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
nested class constructors stealth04 Windows .NET Programming 1 06-15-06 02:47 PM
Redirection back to a page from form submit DAL Perl 11 03-21-05 02:45 PM
Declared Functions skipper23 PHP 4 12-17-03 10:06 AM
index page not showing up skipper23 PHP 3 12-15-03 01:10 PM


All times are GMT -5. The time now is 02:31 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.