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

Insert <link rel="stylesheet"....>

Hello everybody

Ihave few .CSS files, I let user select the color schema of the whole site
using a radiobutton and save it in a cookie..
I want to retrieve the value of the cookie <link href=" HERE "
rel="stylesheet">
i try to put it using InnerHtml or InnerText but it fail using div, span so
on...
how can i handle this..
thanx
Nov 16 '05 #1
3 7274
Just use good old variables. In code behing add a public variable and then
insert server side script inside href like this:
<link href=" <%=strCSSName%>" rel="stylesheet">
"Islam Elkhayat" wrote:
Hello everybody

Ihave few .CSS files, I let user select the color schema of the whole site
using a radiobutton and save it in a cookie..
I want to retrieve the value of the cookie <link href=" HERE "
rel="stylesheet">
i try to put it using InnerHtml or InnerText but it fail using div, span so
on...
how can i handle this..
thanx

Nov 16 '05 #2
I think it's safe to say that that's a bad suggestion. This isn't ASP.

Instead, try doing:
<link rel="stylesheet" type="text/css" id="link" runat="server" />

and in codebehind:

protected HtmlGenericControl link;
private void Page_Load(object sender, EventArgs e) {
link.Attributes.Add("href", "somestyle.css");
}

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"WebMatrix" <We*******@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
Just use good old variables. In code behing add a public variable and then
insert server side script inside href like this:
<link href=" <%=strCSSName%>" rel="stylesheet">
"Islam Elkhayat" wrote:
Hello everybody

Ihave few .CSS files, I let user select the color schema of the whole site using a radiobutton and save it in a cookie..
I want to retrieve the value of the cookie <link href=" HERE "
rel="stylesheet">
i try to put it using InnerHtml or InnerText but it fail using div, span so on...
how can i handle this..
thanx

Nov 16 '05 #3
I didnt know you could do that. Learn something new everyday.

"Karl Seguin" wrote:
I think it's safe to say that that's a bad suggestion. This isn't ASP.

Instead, try doing:
<link rel="stylesheet" type="text/css" id="link" runat="server" />

and in codebehind:

protected HtmlGenericControl link;
private void Page_Load(object sender, EventArgs e) {
link.Attributes.Add("href", "somestyle.css");
}

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"WebMatrix" <We*******@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
Just use good old variables. In code behing add a public variable and then
insert server side script inside href like this:
<link href=" <%=strCSSName%>" rel="stylesheet">
"Islam Elkhayat" wrote:
Hello everybody

Ihave few .CSS files, I let user select the color schema of the whole site using a radiobutton and save it in a cookie..
I want to retrieve the value of the cookie <link href=" HERE "
rel="stylesheet">
i try to put it using InnerHtml or InnerText but it fail using div, span so on...
how can i handle this..
thanx


Nov 16 '05 #4

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

Similar topics

5
by: Stan Brown | last post by:
The page http://w3development.de/css/hide_css_from_browsers/media/ suggests using @media all { } around rules to hide them from older browsers. Suppose the above occurs in a style sheet that...
3
by: Islam Elkhayat | last post by:
Hello everybody Ihave few .CSS files, I let user select the color schema of the whole site using a radiobutton and save it in a cookie.. I want to retrieve the value of the cookie <link href=" ...
2
by: yer darn tootin | last post by:
Here's the scenario: I have a javascript function taking the contents of a datalist ( content from a SQL db ) and opening it in a new window to allow the user to print. The pop-up window...
0
by: Emil Christopher Melar | last post by:
I wanted to use App_Theme, because then I might have some automation when it comes to not hard coding paths for the css. And as you know, you know that mozilla and IE renders differently, and...
1
by: melda | last post by:
I am a real beginnner in ASP. Due to increasing demands on dynamic website, I've been working on ASP website now. I use a ready to use CMS program and right now I've been trying to combine a calendar...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
3
by: PJ6 | last post by:
Embedded javascript can be served from a DLL with an include that uses a special URL generated by the Page.ClientScript.GetWebResourceUrl method at runtime. For example: <script...
3
by: joe | last post by:
Is it OK to have multiple: <script type="text/javascript" src="funcs1.js"></script> <script type="text/javascript" src="funcs2.js"></script> <script type="text/javascript"...
23
by: Stanimir Stamenkov | last post by:
I want to find out whether the following usage of the "Bookmark" link type is o.k. An example could be seen at <http://www.geocities.com/stanio/more/horoskop.html>. The text is in Bulgarian and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.