Hire my services

If you would like to hire my services, you can now do so by visiting the following link:

Website Design Darlington

Article Statistics

ArticlesLatest Entry
2121-May-2008

Code Bank Statistics

CategoryTipsLatest Entry
Applications420-Feb-2008
Cache118-Apr-2007
Controls926-Jul-2007
CSS107-Sep-2007
Database428-Aug-2007
Dates128-Aug-2007
Email105-Mar-2007
Files123-Apr-2007
HTML101-Mar-2007
Images226-Mar-2007
Pages115-Oct-2007
Sessions122-Nov-2007
SQL Server1518-Mar-2008
Strings309-May-2007
Skip Navigation LinksHome > Articles > Display Version Information

Display Version Information

Summary: An example of how we can use an AssemblyInfo file to show version information on our pageSocialize it

There may be cases when we would like to display some information about our application (such as it's name, description or build number). Fortunately, we can enter this information ourselves by creating a file named AssemblyInfo.vb and placing it in the App_Code folder. Here's an example of what to include in this file:

You can see that we have sections where we can enter attributes such as the Title and Description of the site. Also, at the bottom of the file, we can set the version information of the site. You can do this by including the full major, minor, build and revision numbers yourself e.g. (1.0.1.1) or you can just set the major and minor numbers and use a wildcard for the build and revision so that ASP.NET generates them automatically (which is what I have done in the example above).

To display this information, I've created a simple page with a label to display the data:

We then need to use the System.Reflection class to iterate through all of this information and display it on the page:

When we run this page, we will see an output similar to this:

Reader Comments

1. rohit 16/04/2007 06:40:12

Add your comments

Please keep your comments relevant to this page. Any inappropriate or purely promotional comments may be removed. Email addresses are never displayed but are required so you can confirm your comments.

Your Name:
 
Your Email:
 
Add your comments: