Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I retrieve the application version for my web app?

Status
Not open for further replies.

BigRedTexas

Programmer
Mar 14, 2002
22
0
0
US
I need to retrieve the application version number and display it on my start page. Does anyone know how this is done?

Thanks, Scott
 
This should work. The application info such as version is stored in the AssemblyInfo.vb file. This line gets the version number from that file

txtbox1.text = System.Environment.Version
That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Thanks, that worked great. I did at a .toString to get it to work right.
 
meh whichever.
Glad it worked. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Ok, sorry to bring this back from the dead, but this didn't do what I needed.

This displays the .NET Framework version. I am looking for a way to display the installed version of the application.

Thanks,
Scott
 
whooops sorry.

Application.ProductVersion

use this one instead. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
ahhh crap that doesn't work either that's a Windows Form Method.
Some one just shoot me now. I am not having a good day. So I bid you adieu... for now That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Hey Mark, thanks for your help anyway. :)

I can see the value I need in the registry, I just don't have the way to access it. :(

Can I just look for the registry key? How is that done. I know the old WIN API way to do it, but there's gotta be a better way now.

Thanks again, Scott
 
Hi.

I've been watching this hoping for an answer myself. I finally figured it out myself, though. Give this a try. I placed the following line of code in Page_Load(), before testing for post back:

this.lblVersion.Text = "ver. " + System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion.ToString();

The results of this (for me, at least), when displayed on the page were:

ver. 1.0.1091.26235

This turned out to be the correct version number of the dll behind the asp page I was working with.

I really hope this helps you. It was driving me nuts for about a week and a half.

Scott (in Philly)[yinyang]

ps. this is my first post here!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top