Being simple

Any fool can write code that computer can understand. Good programmers write codes that humans can understand.

导航

公告

统计

get assemblyinfo.cs version info in asp.net 2.0

in asp.net 2.0, u can't get version like winform with Application.ProductVersion.
假设在页面中执行assembly.GetexecutingAssembly().GetName().Version.ToString()取出来的信息与assemblyInfo中的也不一致, 因为在asp.net 2.0中每个page有其自己的版本信息.
正确的做法是在App_Code目录中(AssemblyInfo.cs也在此目录下)的某个类中声明一个GetVersion()方法,执行assembly.GetexecutingAssembly().GetName().Version.ToString()即可取得相应的版本信息.

posted on 2006-07-26 11:43 margiex 阅读(255) 评论(0) 编辑 收藏