473,396 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASP.NET Assembly-Version

How can I request the Assembly Version that I set in "AssemblyInfo.cs" ?

In a Windows application, I can get the current version using
Application.ProductVersion, but this naturally won't work with ASP.NET.
--
/Morten Nielsen
Email: http://www.iter.dk/contact.aspx

Nov 17 '05 #1
3 6169
Hi Morten,

Take a look at the Assembly.GetName() method

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.

"Morten Nielsen" <sp**@iter.dk> wrote in message
news:bn**********@news.net.uni-c.dk...
How can I request the Assembly Version that I set in "AssemblyInfo.cs" ?

In a Windows application, I can get the current version using
Application.ProductVersion, but this naturally won't work with ASP.NET.
--
/Morten Nielsen
Email: http://www.iter.dk/contact.aspx

Nov 17 '05 #2
This is what I use (VB.NET)

lblVersion.Text =
System.Reflection.Assembly.GetExecutingAssembly(). GetName().Version.ToString
"Morten Nielsen" <sp**@iter.dk> wrote in message
news:bn**********@news.net.uni-c.dk...
How can I request the Assembly Version that I set in "AssemblyInfo.cs" ?

In a Windows application, I can get the current version using
Application.ProductVersion, but this naturally won't work with ASP.NET.
--
/Morten Nielsen
Email: http://www.iter.dk/contact.aspx


Nov 17 '05 #3
Just a small note: be sure you're coding that line in a codebehind class, it
won't work if you code it inline into an .aspx as the executing assembly
will be the temporal one generated by asp.net,

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.

"Oliver" <DE*******************@hotmail.com> wrote in message
news:uc****************@TK2MSFTNGP10.phx.gbl...
This is what I use (VB.NET)

lblVersion.Text =
System.Reflection.Assembly.GetExecutingAssembly(). GetName().Version.ToString

"Morten Nielsen" <sp**@iter.dk> wrote in message
news:bn**********@news.net.uni-c.dk...
How can I request the Assembly Version that I set in "AssemblyInfo.cs" ?

In a Windows application, I can get the current version using
Application.ProductVersion, but this naturally won't work with ASP.NET.
--
/Morten Nielsen
Email: http://www.iter.dk/contact.aspx

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Theodore | last post by:
Hi, from within an executable I am calling class A located in a dll file which in turn calls class B located in another dll file. I want class B to be able to resolve the last entry assembly. By...
4
by: Reinhold Schalk | last post by:
Hello, somewhere i've read that using strong names does assure two things: 1. Assure that the content of the assembly is not modified (that's ok in my opinion) 2. Assure that the assembly is...
1
by: Benjamin | last post by:
Hi, I'm currently writing a Web Services that interacts with a database. To allow me to use not just one database provider (for example, I could use MS Access, SQL Server or MySQL), the Web...
1
by: Zachary Hartnett | last post by:
I was trying to write a routine this morning that would open a given assembly, walk the inheritance tree of classes in the assembly, and provide a list of classes in the assembly that inherit from...
3
by: markoueis | last post by:
Our .NET application, let's call it A, needs to load an assembly of another .NET application, let's call it B. Preferably I would like to early bind and early load the B assembly. However, in a...
0
by: Erick Shuai | last post by:
In my project, I need to use custom attribute on all assemblies. This attribute will implement some non-functional code and I want to use it on assembly scope(AttributeTargets is Assembly). I...
2
by: john | last post by:
Maybe I haven't had that "a-ha" moment yet, but I think the new approach to web projects is a step in the wrong direction. My main beef is that control over the assembly generation process has...
8
by: Umut Tezduyar | last post by:
I know that, in asp.net 2.0, the assembly for the web site is splitted into pieces and each time you build it, it generates a random name for assembly. My question is, if i create a custom web...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.