ASP.NET Assembly-Version

Discussion in 'ASP .Net' started by Morten Nielsen, Oct 23, 2003.

  1. 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
     
    Morten Nielsen, Oct 23, 2003
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:bn72el$ids$-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
    >
    >
    >
     
    Victor Garcia Aprea [MVP], Oct 23, 2003
    #2
    1. Advertising

  3. Morten Nielsen

    Oliver Guest

    This is what I use (VB.NET)

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


    "Morten Nielsen" <> wrote in message
    news:bn72el$ids$-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
     
    Oliver, Oct 23, 2003
    #3
  4. 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" <> wrote in message
    news:uc$%...
    > This is what I use (VB.NET)
    >
    > lblVersion.Text =
    >

    System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString
    >
    >
    > "Morten Nielsen" <> wrote in message
    > news:bn72el$ids$-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
    >
    >
    >
    >
     
    Victor Garcia Aprea [MVP], Oct 23, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SA
    Replies:
    0
    Views:
    493
  2. Replies:
    5
    Views:
    658
    Vitaly
    Jan 28, 2007
  3. V Green
    Replies:
    0
    Views:
    932
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,044
    PA Bear [MS MVP]
    Feb 5, 2008
  5. MowGreen [MVP]
    Replies:
    5
    Views:
    2,086
    PA Bear [MS MVP]
    Feb 9, 2008
Loading...

Share This Page