943,753 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 3134
  • ASP.NET RSS
May 6th, 2005
0

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

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
lorf14plus is offline Offline
20 posts
since May 2005
May 6th, 2005
0

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

Here is an example using a class called MyClass in Page1.aspx

In you class file:
ASP.NET Syntax (Toggle Plain Text)
  1. Public Class MyClass
  2. Inherits System.Web.UI.Page

In your code behind page:
ASP.NET Syntax (Toggle Plain Text)
  1. Public Class Page1
  2. Inherits MyClass

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

-sypher
Reputation Points: 13
Solved Threads: 0
Light Poster
sypher is offline Offline
29 posts
since May 2005
May 11th, 2005
0

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

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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
lorf14plus is offline Offline
20 posts
since May 2005
May 11th, 2005
0

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

I found the correct way to call the method that is included with the inheriths.
Thanks a lot for your help.

Reputation Points: 10
Solved Threads: 1
Newbie Poster
lorf14plus is offline Offline
20 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: hide checkbox in grid appropriately
Next Thread in ASP.NET Forum Timeline: Web Server controls to a file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC