Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > When does the main class get instantiated?

Reply
Thread Tools

When does the main class get instantiated?

 
 
Sean W.
Guest
Posts: n/a
 
      05-11-2006
I need help understanding how and when a class becomes instantiated.

Scenario...
I have an ascx in which I put in some AJAX code. I put the ascx on a page.
The control is used for users to login to the site. The page puts the control
on if the user has not been authenticated yet. So, now the user visits the
site and has not logged in yet. The control is drawn and made available for
them to login. They type in their credentials and hit the login button. The
button validates their login with a custom routine.

The problem...
The problem is that the AJAX fails. It says the class has not be
instantiated yet. "Object not set to a reference of the object", or something
like that. The AJAX code calls the login routine when the user leaves the
password field in the login control. The login routine is in the class that
contains the Page_Load, etc, of the control. I set a breakpoint on the first
line of the login routine and the execution does stop there, so I know its
trying to execute the function.

How can it not be instantiated if it's already on the screen?

A quick side note...
The page adds the control to itself using,
ContentPane.Controls.Add(Page.LoadControl("~/SignIn.ascx"))


TIA

Sean
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
adding main.aspx.vb & main.aspx.resx under aspx John M ASP .Net 1 05-29-2005 09:27 PM
instanciate a class in a jar file with class.forname, while my main class is in another jar cyril Java 2 08-25-2004 06:55 AM
int main(int argc, char *argv[] ) vs int main(int argc, char **argv ) Hal Styli C Programming 14 01-20-2004 10:00 PM



Advertisments