RSS Forums RSS
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2201 | Replies: 3
Reply
Join Date: May 2005
Posts: 20
Reputation: lorf14plus is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
lorf14plus lorf14plus is offline Offline
Newbie Poster

Help How it is possible tu use a class that is in a new vb file??

  #1  
May 6th, 2005
I have generate a ASP.NET page with a Codebehind but i want to create a file with common method that i must make in many page of my website.
I create a new file class .vb, but how can I using the public function that I have insert in??
Thanks a lot for your help.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2005
Location: Phoenix
Posts: 29
Reputation: sypher is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
sypher's Avatar
sypher sypher is offline Offline
Light Poster

Re: How it is possible tu use a class that is in a new vb file??

  #2  
May 6th, 2005
Here is an example using a class called MyClass in Page1.aspx

In you class file:
Public Class MyClass
    Inherits System.Web.UI.Page

In your code behind page:
Public Class Page1
    Inherits MyClass

So, you are replacing "Inherits System.Web.UI.Page" in your codebehind pages with the name of your class.

-sypher
Reply With Quote  
Join Date: May 2005
Posts: 20
Reputation: lorf14plus is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
lorf14plus lorf14plus is offline Offline
Newbie Poster

Re: How it is possible tu use a class that is in a new vb file??

  #3  
May 11th, 2005
Thanks for you help but I don't know how it is possible to call the metod when I have defined the Inherits, can you post me an complete example??
I prove many time but I don't found an example to refer for resolve this problem.

Thanks a lot
Reply With Quote  
Join Date: May 2005
Posts: 20
Reputation: lorf14plus is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
lorf14plus lorf14plus is offline Offline
Newbie Poster

Re: How it is possible tu use a class that is in a new vb file??

  #4  
May 11th, 2005
I found the correct way to call the method that is included with the inheriths.
Thanks a lot for your help.

Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

Thread Tools Display Modes
All times are GMT -4. The time now is 3:14 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC