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 8042087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:27:18+00:00 2026-06-05T04:27:18+00:00

I have the following code: <link rel=stylesheet type=text/css href=<%= GlobalVar.BasePath %>/css/style.css /> the c#

  • 0

I have the following code:

<link rel="stylesheet" type="text/css" href="<%= GlobalVar.BasePath %>/css/style.css" />

the c# code is rendered as text, but the following works:

<link rel="stylesheet" type="text/css" href=<%= "\"" + GlobalVar.BasePath %>/css/style.css" />

Just curious, what is the solution to render it normally like I did in the first example?

I just want to know why it renders as text.

  • 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-06-05T04:27:20+00:00Added an answer on June 5, 2026 at 4:27 am

    Not sure why you’re getting the issues, but you could solve the problem of using the GlobalVar by programmatically adding the css link:

    protected void Page_Init(object sender, EventArgs e)
    { 
        HtmlLink css = new HtmlLink();
        css.Href = String.Format("{0}/css/style.css", GlobalVar.BasePath);
        css.Attributes["rel"] = "stylesheet";
        css.Attributes["type"] = "text/css";
        css.Attributes["media"] = "all";
        Page.Header.Controls.Add(css); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: <!DOCTYPE html> <html> <head> <link rel=stylesheet type=text/css media=screen href=jquery-ui-1.8.9.custom.css
I have the following code: index.html <HTML> <HEAD> <TITLE>My App</TITLE> <LINK rel=stylesheet type=text/css href=style.css>
All, In the following code <html> <head> <link type=text/css href=http://jqueryui.com/latest/themes/base/ui.all.css rel=stylesheet /> <script type=text/javascript
I am having a link <a id=test href=text.php>test</a> I have the following jquery code
In my aspx I have this line: <link href=<%= Request.ApplicationPath %>/css/ma/screen-ma.css rel=Stylesheettype=text/css media=screen />
I have the following code in my website: <link rel=apple-touch-icon href=http://website.com/images/apple-touch-icon.png /> When I
I have the following code, but it is not working, the link only is
I have the following code: <a href=http://mydomain.com/link123 class=someClickEvent>Some Link</a> $(document).ready(function(){ $('.someClickEvent').click(function() { var $deal_id
i have following HTML code:- <table class=results> <tr> <td> <a href=..>link</a><span>2nd Mar 2011</span><br>XYZ Consultancy
I have the following code: <h1><a href=# class=link>Click here</a></h1> <div class=acitem></div> <div class=acitem2></div> <script>

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.