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

Posted on 2010-11-11
Medium Priority
Last Modified: 2012-05-10

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?
Question by:VBBRett

Accepted Solution

isaackhazi earned 1000 total points
ID: 34118222
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.

Assisted Solution

guvera earned 1000 total points
ID: 34118260

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

declare void as public

Public void SubName()


Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In the video, one can understand the process of resizing images in single or bulk. Kernel Bulk Image Resizer is an easy to use tool for resizing large number of images. One can add and resize multiple images with this tool in single go. The video sh…
To export Lotus Notes to Outlook PST or Exchange and Domino Server files to Exchange Server or PST files with ease, go for Kernel for Lotus Notes to Outlook conversion tool. Through the video, you can watch the conversion process. A common user with…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question