ASP.NET Assembly-Version

M

Morten Nielsen

How can I request the Assembly Version that I set in "AssemblyInfo.cs" ?

In a Windows application, I can get the current version using
Application.ProductVersion, but this naturally won't work with ASP.NET.
 
V

Victor Garcia Aprea [MVP]

Hi Morten,

Take a look at the Assembly.GetName() method

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.
 
O

Oliver

This is what I use (VB.NET)

lblVersion.Text =
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString


How can I request the Assembly Version that I set in "AssemblyInfo.cs" ?

In a Windows application, I can get the current version using
Application.ProductVersion, but this naturally won't work with ASP.NET.
 
V

Victor Garcia Aprea [MVP]

Just a small note: be sure you're coding that line in a codebehind class, it
won't work if you code it inline into an .aspx as the executing assembly
will be the temporal one generated by asp.net,

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top