In a Windows application, I can get the current version using:
Version version = new Version(System.Windows.Forms.
Application.ProductVersion);
But this naturally won't work with ASP.NET, so you have to use the following statement to get the version in ASP.NET
Version version = System.Reflection.Assembly.
GetExecutingAssembly().GetName().Version