|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Adding CssClass on .ascx pageHi,
I would like to use a separate stylesheet for a .ascx module without changning the stylesheet that is referenced in the .aspx page <HEAD> section Is it possible to reference another stylesheet from a .ascx page and possibly load it from code ? Niclas *** Sent via Developersdex http://www.developersdex.com *** You cant add specific stylesheet as reference in your .ascx control.But u can
do programmatically for each control included in ur .ascx file using Controlname.Style.Add("color",'red') or Controlname.Attributes.Add("style","color:red") Show quoteHide quote "Niclas Lindblom" wrote: > Hi, > > I would like to use a separate stylesheet for a .ascx module without > changning the stylesheet that is referenced in the .aspx page <HEAD> > section > > Is it possible to reference another stylesheet from a .ascx page and > possibly load it from code ? > > Niclas > > > > > > *** Sent via Developersdex http://www.developersdex.com *** > > Hi, I don't think it is possible, as the ascx doesn't exist as a separate > > I would like to use a separate stylesheet for a .ascx module without > changning the stylesheet that is referenced in the .aspx page <HEAD> > section > > Is it possible to reference another stylesheet from a .ascx page and > possibly load it from code ? > > Niclas > entity when the page output has arrived at the browser. The output of all your ascx'es (and the aspx) is combined into a single html file. You can't specify a css to apply to just a *part* of your html file. Hans Kesting
Other interesting topics
Can't edit, delete or add row in an Access database in a website 2
must use updateable query request specific holding location.... GredView {0:d} formatting doesn't work Event 1089 .ascx file as index page? How to add Label control to DataList? Dynamically Loading the User Control and Passing Parameters to it. Horizontal CSS drop-down menu? Fail to save xmldocument |
|||||||||||||||||||||||