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?
VBBRettAsked:
Who is Participating?
 
isaackhaziConnect With a Mentor Commented:
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
 
guveraConnect With a Mentor Commented:
Hi,

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

declare void as public

Public void SubName()
{
}

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.