Solved

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

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
I need help changing the default value for an @HTML.LabelFor control 4 36
Data organization issue 7 37
Need help with a query 14 37
YouTube API get the Video Tags - vb.net 7 28
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 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