Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6732149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:36:53+00:00 2026-05-26T10:36:53+00:00

<link rel=stylesheet type=text/css href=../Content/Dashboard/CustomTooltip.css?v=<%= System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion %> /> Couple of questions: Is this an alright

  • 0
<link rel="stylesheet" type="text/css" href="../Content/Dashboard/CustomTooltip.css?v=<%= System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion %>" />

Couple of questions:

  • Is this an alright way of going about this? The idea is that when our products assembly information changes, the version updates, the path to the CSS file gets modified and invalidates the cache.
  • If I place the C# code into a watch window I see the proper version info, but in the .aspx page it fails to load it. No error message, but it just says .css?v= with no version.

Thanks

Edit: It seems like its something to do with the reflection that’s going on. If I say:

System.Reflection.Assembly.GetExecutingAssembly().GetName().Name

I see the proper name in the watch window, but when evaluated on the .aspx page it is App_Web_35 (not correct). Any idea how to fix this?

Edit2: I ended up going with a solution I’m not quite happy with, but would love to hear other inputs. I just put:

protected string GetApplicationVersion()
{
    return System.Diagnostics.FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
}

on my related CS page — and then in the code behing I called <% GetApplicationVersion() %> and now it happily returns the proper information. I wish it could be inlined, though.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:36:54+00:00Added an answer on May 26, 2026 at 10:36 am

    A css file is static, like html. Think about create different css files and call it like this

    <link rel="stylesheet" type="text/css" href="../Content/Dashboard/CustomTooltip_<%= `System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAsse`m`bly().Location).FileVersion %>.css" />`
    

    so you need a css file like this ../Content/Dashboard/CustomTooltip_1.0.css

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my View, I have included the css : <link rel=stylesheet type=text/css href='<%=Url.Content(~/Content/login.css)%>'/> in
I want to add this code: <link rel=stylesheet type=text/css href=css/global.css /> <!--[if lt IE
When i use this code <!--[if IE 6]> <link rel=stylesheet href=ie6.css type=text/css /> <![endif]-->
I have a html like this: <html> <head> <link rel=stylesheet type=text/css media=all href=style.css> </head>
How can I do this? <head runat=server> <title></title> <link rel=stylesheet href=default.css type=text/css> <asp:ContentPlaceHolder ID=head
Well i have 2 css includes <link href=Styles/layout.css rel=stylesheet type=text/css /> <link href=Styles/ATJournal.css rel=stylesheet
<html> <link rel=stylesheet type=text/css href=http://extjs.cachefly.net/ext-3.3.1/resources/css/ext-all.css/> <script type=text/javascript src=http://extjs.cachefly.net/ext-3.3.1/adapter/ext/ext-base.js></script> <script type=text/javascript src=http://extjs.cachefly.net/ext-3.3.1/ext-all-debug.js></script> <script type=text/javascript src=http://dev.sencha.com/playpen/google-visualization/GVisualizationPanel.js></script>
I have the following file: <html> <head> <title></title> <link rel=css type=text/css href=/empty.css title=css />
function switchTemplate(stylePath){ var ns = $('<link>', { href: stylePath, id: 'themeStyle', type: 'text/css', rel:
Consider the following markup: <!DOCTYPE html> <html> <head> <title>Test Page</title> <link href=screen.css rel=stylesheet />

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.