System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
Note: this will be 0.0.0.0 if you use it in the code-forward of an aspx page.