ASP.NET version control
Assuming you are using a web application (not a website project), you should find that you have an AssemblyInfo.cs file in your Properties folder.
This will contain attributes like:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
If you have a website project, you can manually add a new .cs file and put these attributes in it.
More information on these attributes can be found here (on SO):
Update
Just by reading the above post, it is possible that AssemblyInformationalVersion is a more appropriate attribute to use if you are just trying to store information that you only show to the user.
update II
This is some "quick and dirty" code that will grab the informational version from an attribute:
string version = Assembly
.GetExecutingAssembly()
.GetCustomAttributes(
typeof(AssemblyInformationalVersionAttribute), true)
.Where(x => x.GetType() ==
typeof(AssemblyInformationalVersionAttribute))
.Cast<AssemblyInformationalVersionAttribute>()
.First()
.InformationalVersion;
If I were you, I would write a class that contains the value of an attribute, and the code above that refers to it, so that you can implement your version number with that attribute or whatever you like, and then change the way you implement it over time.
a source to share
ASP.Net website is not a project. If you have a source control add-in that requires a project file, you need to make your site a web application project.
Web Application Projects was the only option for ASP.Net in Visual Studio 2003 and 2001, but was removed in 2005 in favor of the website model, then this functionality was re-provided for VS 2005, but you will need you to install the add-in can read it here: http://msdn.microsoft.com/en-us/asp.net/aa336618.aspx In VS 2008, web application projects are built in idea.
a source to share