473,385 Members | 1,983 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,385 software developers and data experts.

asp.net tags

Hey guys
doesn any one know why this happnes

i have a master page with a public property

public string CssFileName {
get {
return css;
}
set {
css = value;
}
}

now in my master page i have a tag like this
<link href="Scripts/Css/<%= CssFileName %>" rel="stylesheet"
type="text/css" />
but this renders as

<link href="Scripts/Css/&lt;%= CssFileName %>" rel="stylesheet"
type="text/css" />
but the same method works for Javascript tag it renders it fine

any idea why this happnes?
---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
2 1003
Hi Amir:

Are you trying to set the style sheet dynamically?

Have you tried just placing the .css file inside of a directory of
App_Themes? The ASP.NET runtime will automatically inject css files
for the currently selected theme.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sun, 18 Sep 2005 07:26:11 -0700, Amir Ghezelbash
<am*******@hotmail.com> wrote:
Hey guys
doesn any one know why this happnes

i have a master page with a public property

public string CssFileName {
get {
return css;
}
set {
css = value;
}
}

now in my master page i have a tag like this
<link href="Scripts/Css/<%= CssFileName %>" rel="stylesheet"
type="text/css" />
but this renders as

<link href="Scripts/Css/&lt;%= CssFileName %>" rel="stylesheet"
type="text/css" />
but the same method works for Javascript tag it renders it fine

any idea why this happnes?
---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***


Nov 19 '05 #2
Hello

Yes i am

i have a JS file and a CSS file for every page on my website...all these
pages inherit from the master page
so i would like to assing each pages JS and CSS file dinamically

so my Register.aspx page will have Register.JS and Register.Css file

and in load page i would do something like
((MasterPage)this.Master).CssFileName = "Main.css";
((MasterPage)this.Master).JSFileName = "Main.js";

but like i said.... that link tag isnot rendering right

any ideas?

---
Best Regards
Amir

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3

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

Similar topics

7
by: varois83 | last post by:
Hi I am fairly new to PHP/mysql and was reading an online tutorial and learned that my short tags weren't enabled. At this time I have no need for them, my setup apache/mysql/php runs on my PC...
0
by: Philippe Poulard | last post by:
People that have a knowledge of XQuery, XSLT, Ant, JSP/PHP/ASP, Cocoon, XMLBeans, taglibs and many others should recognize any of them in "Active Tags". " Active Tags is a set of specifications...
24
by: Day Bird Loft | last post by:
Web Authoring | Meta-Tags The first thing to understand in regard to Meta Tags is the three most important tags placed in the head of your html documents. They are the title, description, and...
7
by: Jasper Bryant-Greene | last post by:
I have three tables: `photos`, `tags` and `tags_photos`. The `photos` table contains a unique ID and a bunch of other stuff, the `tags` table contains a unique ID and a tag name, and the...
1
by: Jenny | last post by:
Hi, Can I create an array of tags by assigning same name to these tags? For example, I have two <p> tags with the same name t1. But document.all.b.value=document.all.t.length does not...
12
by: Oberon | last post by:
I have a large HTML document. It has hundreds of <span>s which have no attributes so these <span>s are redundant. How can I remove these tags automatically? The document also has <span>s with...
12
by: Stefan Weiss | last post by:
Hi. (this is somewhat similar to yesterday's thread about empty links) I noticed that Tidy issues warnings whenever it encounters empty tags, and strips those tags if cleanup was requested....
23
by: Big Bill | last post by:
http://www.promcars.co.uk/pages/bonnie.php I don't believe they should be there, can I take them out without stopping the includes from functioning? I'm the (hapless) optimiser on this one... I...
3
by: Paul Moore | last post by:
I'd like to write some scripts to analyze and manipulate my music files. The files themselves are in MP3 and FLAC format (mostly MP3, but FLAC where I ripped original CDs and wanted a lossless...
1
by: arrival123 | last post by:
Hello, I'm currently trying to decide on a database design for tags in my web 2.0 application. The problem I'm facing is that I have 3 separate tables i.e. cars, planes, and schools. All three...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.