Solved

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

Posted on 2010-11-11
2
287 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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

837 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