• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

How do you create a Sub program so that it can be used on every web page?

Hello,

I am looking for a way to create a sub program in asp.net so that it can be used in all of my web pages or .aspx files.  How do I do this?
0
VBBRett
Asked:
VBBRett
2 Solutions
 
isaackhaziCommented:
Right Click on Your Project > Add New Item

Select a Class File (.VB) file. Give it a name.

Declare Subs as Public

Public Sub SubName()
       

 End Sub

This can be accessed from all forms.
0
 
guveraCommented:
Hi,

 isaackhazi give a right solution. If you select a class file in c#,

declare void as public

Public void SubName()
{
}

Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now