ASP.Net版本/内部版本号 [英] ASP.Net Version/Build Number

查看:402
本文介绍了ASP.Net版本/内部版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.Net(.NET 3.5 / C#),我想显示的版本号/版本号和日期。什么是controling是最好的方法,是可以自动incriment上构建的数字?

I have a ASP.Net (.net 3.5/c#) and I want to display a version number / build number and date. What is the best way in controling this and is it possible to auto incriment the numbers on build?

什么是版本号和放大器的标准;集结号?

What is the standard for version numbers & build number?

即时通讯使用VS 2008如何将我得到的数据,并分配给一个字符串值,这样我就可以在网页的页脚显示?

Im using VS 2008 how would I get the data and assign to a string value so I can show in the footer of the webpage?

推荐答案

如果您使用的是Web应用程序项目 - 你可以做这样的...

If you're using a Web Application Project - you could do it like this...

Assembly web = Assembly.Load("App_Code");
AssemblyName webName = web.GetName();

string myVersion = webName.Version.ToString();

如果您使用的是网站项目 - 几乎是相同的......

If you're using a Web Site project - nearly the same...

Assembly web = Assembly.GetExecutingAssembly();
AssemblyName webName = web.GetName();

string myVersion = webName.Version.ToString();

这篇关于ASP.Net版本/内部版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆