473,473 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 6172
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.