Solved

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

Posted on 2010-11-11
2
289 Views
Last Modified: 2012-05-10
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
Comment
Question by:VBBRett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
isaackhazi earned 250 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.
0
 
LVL 8

Assisted Solution

by:guvera
guvera earned 250 total points
ID: 34118260
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

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 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