Display Application version on page footer using C# and VB.Net in ASP.Net

Last Reply 5 days ago By dharmendr

Posted 5 days ago


i have asp dot net project and connect wtih team foundation server.

my boss asked me to do version on footer on application and with each change version number should auto increment so we know on which version we are pls advice how to do that

Posted 5 days ago

Hi nauna,

Add a Label to your master page footer where you would like to display the version.

Import the namespace System.Reflection

In Page_Load event of master page write the below code.


protected void Page_Load(object sender, EventArgs e)
    Version version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
    lblVersion.Text = string.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);


Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
    Dim version As Version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version
    lblVersion.Text = String.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision)
End Sub

The version set from the Applications Assembly information is displayed in the form.

For auto increment the version refer below links.