Hi all,
I have written a registration aspx page that I want to "brand"
based on a query string parameter passed to me on a redirect. Basically
if the Service param in the query string is A I want to apply a
stylesheet but if it is B I want to apply a different stylesheet. Is it
possible to select a stylesheet from the Page_Load method in the c#
behind the aspx? Or is there another way to accomplish this?
Thanks in advance 7 1805
you can use skins in ASP.NET 2.0...
Skins are exactly like that, you choose your skin file (it's a CSS file) to
use where in the code you want...
googleit 4 more information under asp.net 2.0 and skins
--
Bruno Alexandre
(a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem
news:11**********************@f6g2000cwb.googlegro ups.com... Hi all, I have written a registration aspx page that I want to "brand" based on a query string parameter passed to me on a redirect. Basically if the Service param in the query string is A I want to apply a stylesheet but if it is B I want to apply a different stylesheet. Is it possible to select a stylesheet from the Page_Load method in the c# behind the aspx? Or is there another way to accomplish this?
Thanks in advance
I'm afraid I can't use 2.0. Is this not possible in 1.1?
Bruno Alexandre wrote: you can use skins in ASP.NET 2.0...
Skins are exactly like that, you choose your skin file (it's a CSS file) to use where in the code you want...
googleit 4 more information under asp.net 2.0 and skins
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@f6g2000cwb.googlegro ups.com... Hi all, I have written a registration aspx page that I want to "brand" based on a query string parameter passed to me on a redirect. Basically if the Service param in the query string is A I want to apply a stylesheet but if it is B I want to apply a different stylesheet. Is it possible to select a stylesheet from the Page_Load method in the c# behind the aspx? Or is there another way to accomplish this?
Thanks in advance
Just add a runat attribute to your traditional link tag. ID attribute has to
be present, and tag has to be properly closed (not like HTML).<head>
<link id="MyStyleSheet" rel="stylesheet" type="text/css" runat="server" />
</head>Then in your Page_Load, simply add a "href" attribute as below:Sub
Page_Load(Sender As Object, E As EventArgs)
If Not (IsPostBack)
MyStyleSheet.Attributes.Add("href","/css/flostyle.css")
End If
End SubHope this helps
--
Bruno Alexandre
(a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem
news:11**********************@i40g2000cwc.googlegr oups.com...
I'm afraid I can't use 2.0. Is this not possible in 1.1?
Bruno Alexandre wrote: you can use skins in ASP.NET 2.0...
Skins are exactly like that, you choose your skin file (it's a CSS file) to use where in the code you want...
googleit 4 more information under asp.net 2.0 and skins
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@f6g2000cwb.googlegro ups.com... Hi all, I have written a registration aspx page that I want to "brand" based on a query string parameter passed to me on a redirect. Basically if the Service param in the query string is A I want to apply a stylesheet but if it is B I want to apply a different stylesheet. Is it possible to select a stylesheet from the Page_Load method in the c# behind the aspx? Or is there another way to accomplish this?
Thanks in advance
Ok yeah I see what you mean. Thanks a lot for your help.
Bruno Alexandre wrote: Just add a runat attribute to your traditional link tag. ID attribute hasto be present, and tag has to be properly closed (not like HTML).<head> <link id="MyStyleSheet" rel="stylesheet" type="text/css" runat="server" /> </head>Then in your Page_Load, simply add a "href" attribute as below:Sub Page_Load(Sender As Object, E As EventArgs) If Not (IsPostBack) MyStyleSheet.Attributes.Add("href","/css/flostyle.css") End If End SubHope this helps --
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@i40g2000cwc.googlegr oups.com... I'm afraid I can't use 2.0. Is this not possible in 1.1?
Bruno Alexandre wrote: you can use skins in ASP.NET 2.0...
Skins are exactly like that, you choose your skin file (it's a CSS file) to use where in the code you want...
googleit 4 more information under asp.net 2.0 and skins
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@f6g2000cwb.googlegro ups.com... Hi all, I have written a registration aspx page that I want to "brand" based on a query string parameter passed to me on a redirect. Basically if the Service param in the query string is A I want to apply a stylesheet but if it is B I want to apply a different stylesheet. Is it possible to select a stylesheet from the Page_Load method in the c# behind the aspx? Or is there another way to accomplish this?
Thanks in advance
I tried this but when i try to build I get and error : The type or
namespace name 'MyStyleSheet' could not be found (are you missing a
using directive or an assembly reference?) at the line
MyStyleSheet.Attributes.Add("href","/mysheet.css") da*******@gmail.com wrote: Ok yeah I see what you mean. Thanks a lot for your help.
Bruno Alexandre wrote: Just add a runat attribute to your traditional link tag. ID attribute has to be present, and tag has to be properly closed (not like HTML).<head> <link id="MyStyleSheet" rel="stylesheet" type="text/css" runat="server" /> </head>Then in your Page_Load, simply add a "href" attribute as below:Sub Page_Load(Sender As Object, E As EventArgs) If Not (IsPostBack) MyStyleSheet.Attributes.Add("href","/css/flostyle.css") End If End SubHope this helps --
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@i40g2000cwc.googlegr oups.com... I'm afraid I can't use 2.0. Is this not possible in 1.1?
Bruno Alexandre wrote: you can use skins in ASP.NET 2.0...
Skins are exactly like that, you choose your skin file (it's a CSS file) to use where in the code you want...
googleit 4 more information under asp.net 2.0 and skins
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@f6g2000cwb.googlegro ups.com... > Hi all, > I have written a registration aspx page that I want to "brand" > based on a query string parameter passed to me on a redirect. Basically > if the Service param in the query string is A I want to apply a > stylesheet but if it is B I want to apply a different stylesheet. Is it > possible to select a stylesheet from the Page_Load method in the c# > behind the aspx? Or is there another way to accomplish this? > > Thanks in advance >
no...
check the link: http://www.codeproject.com/aspnet/setcssfilelink.asp
--
Bruno Alexandre
(a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem
news:11**********************@f6g2000cwb.googlegro ups.com...
I tried this but when i try to build I get and error : The type or
namespace name 'MyStyleSheet' could not be found (are you missing a
using directive or an assembly reference?) at the line
MyStyleSheet.Attributes.Add("href","/mysheet.css") da*******@gmail.com wrote: Ok yeah I see what you mean. Thanks a lot for your help.
Bruno Alexandre wrote: Just add a runat attribute to your traditional link tag. ID attribute has to be present, and tag has to be properly closed (not like HTML).<head> <link id="MyStyleSheet" rel="stylesheet" type="text/css" runat="server" /> </head>Then in your Page_Load, simply add a "href" attribute as below:Sub Page_Load(Sender As Object, E As EventArgs) If Not (IsPostBack) MyStyleSheet.Attributes.Add("href","/css/flostyle.css") End If End SubHope this helps --
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@i40g2000cwc.googlegr oups.com... I'm afraid I can't use 2.0. Is this not possible in 1.1?
Bruno Alexandre wrote: you can use skins in ASP.NET 2.0...
Skins are exactly like that, you choose your skin file (it's a CSS file) to use where in the code you want...
googleit 4 more information under asp.net 2.0 and skins
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@f6g2000cwb.googlegro ups.com... > Hi all, > I have written a registration aspx page that I want to "brand" > based on a query string parameter passed to me on a redirect. > Basically > if the Service param in the query string is A I want to apply a > stylesheet but if it is B I want to apply a different stylesheet. Is > it > possible to select a stylesheet from the Page_Load method in the c# > behind the aspx? Or is there another way to accomplish this? > > Thanks in advance >
As the object is outside the form, it won't be declared automatically in
the code behind. You have to declare it specifically:
Protected MyStyleSheet as HtmlGenericControl da*******@gmail.com wrote: I tried this but when i try to build I get and error : The type or namespace name 'MyStyleSheet' could not be found (are you missing a using directive or an assembly reference?) at the line MyStyleSheet.Attributes.Add("href","/mysheet.css")
da*******@gmail.com wrote: Ok yeah I see what you mean. Thanks a lot for your help.
Bruno Alexandre wrote: Just add a runat attribute to your traditional link tag. ID attribute has to be present, and tag has to be properly closed (not like HTML).<head> <link id="MyStyleSheet" rel="stylesheet" type="text/css" runat="server" /> </head>Then in your Page_Load, simply add a "href" attribute as below:Sub Page_Load(Sender As Object, E As EventArgs) If Not (IsPostBack) MyStyleSheet.Attributes.Add("href","/css/flostyle.css") End If End SubHope this helps --
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@i40g2000cwc.googlegr oups.com... I'm afraid I can't use 2.0. Is this not possible in 1.1?
Bruno Alexandre wrote: you can use skins in ASP.NET 2.0...
Skins are exactly like that, you choose your skin file (it's a CSS file) to use where in the code you want...
googleit 4 more information under asp.net 2.0 and skins
--
Bruno Alexandre (a Portuguese in Københanv, Danmark)
<da*******@gmail.com> escreveu na mensagem news:11**********************@f6g2000cwb.googlegro ups.com... > Hi all, > I have written a registration aspx page that I want to "brand" > based on a query string parameter passed to me on a redirect. Basically > if the Service param in the query string is A I want to apply a > stylesheet but if it is B I want to apply a different stylesheet. Is it > possible to select a stylesheet from the Page_Load method in the c# > behind the aspx? Or is there another way to accomplish this? > > Thanks in advance > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: RanDeep |
last post by:
I have two nodes that both exist underneath the root node. They are
linked, however, in the sense that one of the nodes contains a copy of
an id that is used to refer to the other. However, when I...
|
by: Colin Toal |
last post by:
Hi all,
I'm starting to learn XSLT - and have what I think is a very basic
question:
I have a stylesheet like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet...
|
by: David Nedrow |
last post by:
OK, I have a problem which I'm guessing is simply my inability to
figure out a select pattern in XSL.
I have an XML file similar to the following:
<?xml version="1.0"?>
<?xml-stylesheet...
|
by: celerystick |
last post by:
This is an xsl question, comp.infosystems.www.authoring.stylesheets
were not able to help , here goes ....
With one xml file containing repeated element <subject>:
...
|
by: cching |
last post by:
Hi,
I'm trying to turn this:
<Component>
<Properties>
<Property Name="X" Value="200" />
<Property Name="Y" Value="200" />
<Property Name="Width" Value="100" />
<Property Name="Height"...
|
by: Andy |
last post by:
Hi, I'm trying to render tabular data in an HTML document using XSL to
transform XML data into an HTML table. Some of the tabular data
appears as droplists (implemented by the HTML Select and...
|
by: Patrick |
last post by:
Hi All,
I'm new to all this and I'm back for more help. I am working with global
variables. I'm trying to make my xls just display the data for the
defined <moorname>. In my example I am using...
|
by: naima.mans |
last post by:
Hello,
i want to select 2 following brothers nodes wich are one under another
(one closed to another)... i have done one xslt file... but it's not
really good..
for example:
the xml file:...
|
by: tjc0ol |
last post by:
Hi guys,
I'm a newbie in php and I got error in my index.php which is:
1054 - Unknown column 'p.products_id' in 'on clause'
select p.products_image, pd.products_name, p.products_id,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |