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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Application version number help please

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
I'm used to windows applications where I can set the build number so my users can see the progress.

Is there any use to doing this in a web application?

I'd like to be able to have documentation saying this was fixed in version xx.xx.

What is the best way of adding a version number to my application?

Thanx
 
I would suggest inserting an appsetting variable in the web.config file with the current version number.. you can access this value from any of your pages and display it on the screen.

Code:
<configuration>
  <appSettings>
    <add key="Version" value="xx.xx"/>
  </appSettings>
</configuration>

and access it using:

Code:
Label1.Text = ConfigurationManager.AppSettings["Version"];

Cheers,

G.

Oxigen - Next generation business solutions
-----------------------------
Components/Tools/Forums/Software/Web Services
 
An easier method would be to get the number directly from the assembly so that you don't have to maintain it. Here's an example:



-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Is this not the same thing?
It's showing I need to add a AssemblyInfo.vb file.

Ok I see. The system finds this file and uses it to maintain the version number for me.

But I need to create the file first.
 
Yes you need to create the file first but the build number will be automatically increased with each build (note that the major/minor version can still be configured manually).


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Excellent!!!
Thanks Mark, and thanks too Gorkem for your help.
Your code I can use somewhere else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top