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();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…