Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: User-Defined Classes with ASP.Net


Message #1 by kpowers@w... on Mon, 10 Mar 2003 20:42:48
Hi Everyone,

First I should say I'm new to .Net and I'm trying to convert a VB6 desktop 
app. to a Web Application.  With regards to that I have a question about 
using user-defined classes.  I have a class called User that holds user 
name, login name, password, and rights.  In the vb app my user class is 
public throughout the app.  So when the user logs in the class is 
intialized and filled with data about that user.  Is there any way to do 
that in the .net Web Application.  I have the class converted and have the 
clsUser.vb added to the project.  How would I make this class public to 
all of my web forms?  

Ken
Message #2 by "Rohit Arora" <rohit_arora@i...> on Tue, 11 Mar 2003 10:02:56 +0530
put it in global.asax

Regards
Rohit Arora
Intersolutions (P) Ltd
B - 21, Sector 58,
Noida - 201301
Tel : 91-2585703/04/05 Extn: 229

"Desire means never Quit. It may be near when it seems far, so stick to the
fight when you are hardest hit.Its when things go wrong, that u must not
Quit."


-----Original Message-----
From: kpowers@w... [mailto:kpowers@w...]
Sent: Monday, March 10, 2003 8:43 PM
To: aspx_beginners
Subject: [aspx_beginners] User-Defined Classes with ASP.Net


Hi Everyone,

First I should say I'm new to .Net and I'm trying to convert a VB6 desktop
app. to a Web Application.  With regards to that I have a question about
using user-defined classes.  I have a class called User that holds user
name, login name, password, and rights.  In the vb app my user class is
public throughout the app.  So when the user logs in the class is
intialized and filled with data about that user.  Is there any way to do
that in the .net Web Application.  I have the class converted and have the
clsUser.vb added to the project.  How would I make this class public to
all of my web forms?

Ken

Message #3 by "Dale Purdon" <dale@t...> on Tue, 11 Mar 2003 10:07:49 +0200
...why would you have to put it in Global.asax. Simply declare the class
as Public and it is accessible from any webform in your project. Am I
not correct?

-----Original Message-----
From: Rohit Arora [mailto:rohit_arora@i...] 
Sent: 11 March 2003 06:33 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: User-Defined Classes with ASP.Net

put it in global.asax

Regards
Rohit Arora
Intersolutions (P) Ltd
B - 21, Sector 58,
Noida - 201301
Tel : 91-2585703/04/05 Extn: 229

"Desire means never Quit. It may be near when it seems far, so stick to
the
fight when you are hardest hit.Its when things go wrong, that u must not
Quit."


-----Original Message-----
From: kpowers@w... [mailto:kpowers@w...]
Sent: Monday, March 10, 2003 8:43 PM
To: aspx_beginners
Subject: [aspx_beginners] User-Defined Classes with ASP.Net


Hi Everyone,

First I should say I'm new to .Net and I'm trying to convert a VB6
desktop
app. to a Web Application.  With regards to that I have a question about
using user-defined classes.  I have a class called User that holds user
name, login name, password, and rights.  In the vb app my user class is
public throughout the app.  So when the user logs in the class is
intialized and filled with data about that user.  Is there any way to do
that in the .net Web Application.  I have the class converted and have
the
clsUser.vb added to the project.  How would I make this class public to
all of my web forms?

Ken



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
 

Message #4 by "Rohit Arora" <rohit_arora@i...> on Tue, 11 Mar 2003 14:02:05 +0530
Yeah ur solution is perfect, sorry i missinterpreted the things Dale. Thanks
for correcting me.

Regards
Rohit Arora
Intersolutions (P) Ltd
B - 21, Sector 58,
Noida - 201301
Tel : 91-2585703/04/05 Extn: 229

"Desire means never Quit. It may be near when it seems far, so stick to the
fight when you are hardest hit.Its when things go wrong, that u must not
Quit."


-----Original Message-----
From: Dale Purdon [mailto:dale@t...]
Sent: Tuesday, March 11, 2003 1:38 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: User-Defined Classes with ASP.Net


...why would you have to put it in Global.asax. Simply declare the class
as Public and it is accessible from any webform in your project. Am I
not correct?

-----Original Message-----
From: Rohit Arora [mailto:rohit_arora@i...]
Sent: 11 March 2003 06:33 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: User-Defined Classes with ASP.Net

put it in global.asax

Regards
Rohit Arora
Intersolutions (P) Ltd
B - 21, Sector 58,
Noida - 201301
Tel : 91-2585703/04/05 Extn: 229

"Desire means never Quit. It may be near when it seems far, so stick to
the
fight when you are hardest hit.Its when things go wrong, that u must not
Quit."


-----Original Message-----
From: kpowers@w... [mailto:kpowers@w...]
Sent: Monday, March 10, 2003 8:43 PM
To: aspx_beginners
Subject: [aspx_beginners] User-Defined Classes with ASP.Net


Hi Everyone,

First I should say I'm new to .Net and I'm trying to convert a VB6
desktop
app. to a Web Application.  With regards to that I have a question about
using user-defined classes.  I have a class called User that holds user
name, login name, password, and rights.  In the vb app my user class is
public throughout the app.  So when the user logs in the class is
intialized and filled with data about that user.  Is there any way to do
that in the .net Web Application.  I have the class converted and have
the
clsUser.vb added to the project.  How would I make this class public to
all of my web forms?

Ken



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003




Message #5 by "Dale Purdon" <dale@t...> on Tue, 11 Mar 2003 10:43:23 +0200
No problem...

-----Original Message-----
From: Rohit Arora [mailto:rohit_arora@i...] 
Sent: 11 March 2003 10:32 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: User-Defined Classes with ASP.Net

Yeah ur solution is perfect, sorry i missinterpreted the things Dale.
Thanks
for correcting me.

Regards
Rohit Arora
Intersolutions (P) Ltd
B - 21, Sector 58,
Noida - 201301
Tel : 91-2585703/04/05 Extn: 229

"Desire means never Quit. It may be near when it seems far, so stick to
the
fight when you are hardest hit.Its when things go wrong, that u must not
Quit."


-----Original Message-----
From: Dale Purdon [mailto:dale@t...]
Sent: Tuesday, March 11, 2003 1:38 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: User-Defined Classes with ASP.Net


...why would you have to put it in Global.asax. Simply declare the class
as Public and it is accessible from any webform in your project. Am I
not correct?

-----Original Message-----
From: Rohit Arora [mailto:rohit_arora@i...]
Sent: 11 March 2003 06:33 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: User-Defined Classes with ASP.Net

put it in global.asax

Regards
Rohit Arora
Intersolutions (P) Ltd
B - 21, Sector 58,
Noida - 201301
Tel : 91-2585703/04/05 Extn: 229

"Desire means never Quit. It may be near when it seems far, so stick to
the
fight when you are hardest hit.Its when things go wrong, that u must not
Quit."


-----Original Message-----
From: kpowers@w... [mailto:kpowers@w...]
Sent: Monday, March 10, 2003 8:43 PM
To: aspx_beginners
Subject: [aspx_beginners] User-Defined Classes with ASP.Net


Hi Everyone,

First I should say I'm new to .Net and I'm trying to convert a VB6
desktop
app. to a Web Application.  With regards to that I have a question about
using user-defined classes.  I have a class called User that holds user
name, login name, password, and rights.  In the vb app my user class is
public throughout the app.  So when the user logs in the class is
intialized and filled with data about that user.  Is there any way to do
that in the .net Web Application.  I have the class converted and have
the
clsUser.vb added to the project.  How would I make this class public to
all of my web forms?

Ken



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003






---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
 


  Return to Index