CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 3/11/2007 11:11:54 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 23 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
Superfly1611
Asp.Net User
Themes: Stylesheet References3/11/2007 11:11:54 AM

0/0

Hello,

I'm writing an ASP.Net 2.0 web site that utilises Themes. For this web site I've written a URL rewriter HttpModule, this is causing hell with my themes because the ASP.Net engine applies my stylesheets using relative paths.

So the page that executes a particular function is stored in a sub folder of my site like http://mydomain/workerpages/worker1.aspx

Visitors to my site navigate to all kinds of urls that don't actually exist thanks to my url re-writer like http://mydomain/sub1/sub2/sub3/view.aspx which then gets mapped to my worker1.aspx file.

Now because worker1.aspx is the page that is executed the ASP.Net engine applies my style sheet reference relative to that page like: src="../App_Themes/Theme1/stylesheet.css"

But my browser interprets that to mean  http://mydomain/sub1/sub2/App_Themes/Theme1/stylesheet.css which is obviously wrong.

 Is is possible to force the Themes engine to apply the stylesheet reference with an absolute link instead?


"There is no such thing as a bug, just an unexpected feature."
Ramzi.Aynati
Asp.Net User
Re: Themes: Stylesheet References3/11/2007 12:46:14 PM

0/0

well this thing is normal, even though u have sub domains, ur themes get to load correctly (they must) unless u have something on ur page changing that.

does ur httomodule interfering with .css extentions, or rewriting there path, or did u manipulate ur web properties of IIS to handle CSS files?

Coz in the normal life, nothing must change and even though ur under 10 subdomains, u mustn't have a problem

Awaiting ur feedback


Regards
Ramzi
--------------------------------------------
Dont Forget to mark the post as answered once replied.
Superfly1611
Asp.Net User
Re: Themes: Stylesheet References3/11/2007 1:06:59 PM

0/0

I realize why it is happening, it's happening because it is rendering ht HTML for the actual page that is processing the request - yes I understand this.

But because the ASP.Net Theme engine renders relative links to my style sheet it is immediately broken as soon as a page within the a different level sub-directory (not sub-domain) is called.

Again, I understand why this is happening - I'm just asking if there is a way to over-ride the way Themes apply there style sheets?


"There is no such thing as a bug, just an unexpected feature."
Ramzi.Aynati
Asp.Net User
Re: Themes: Stylesheet References3/11/2007 1:21:49 PM

0/0

why not remove the sylesheet from ur theme, and include them using ur code behind

of course add this to ur head section of ur page

<

style runat="server" id="cStyle1" type="text/css" />

 <style runat="server" id="cStyle2" type="text/css" />

In ur page_Load

cStyle1.Attributes.Add("href", ResolveUrl("path to style"));

 

Hope this will be a fine solution for u


Regards
Ramzi
--------------------------------------------
Dont Forget to mark the post as answered once replied.
Superfly1611
Asp.Net User
Re: Themes: Stylesheet References3/11/2007 2:04:25 PM

0/0

Thats the solution that I am already using - but what I would prefer is a solution that integrates itself with the ASP.Net Themes engine so that were I to change to a different Theme in the web.config all my pages would change accordingly.

"There is no such thing as a bug, just an unexpected feature."
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Professional Community Server Themes Authors: Wyatt Preul, Benjamin Tiedt, Pages: 337, Published: 2007
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
ASP.NET 2.0 All-In-One Desk Reference For Dummies: all-in-one desk reference for dummies Authors: Doug Lowe, Jeff Cogswell, Ken Cox, Pages: 910, Published: 2006
Firefox Hacks: Tips & Tools for Next-generation Web Browsing Authors: Nigel McFarlane, Pages: 377, Published: 2005
FrontPage 2002 Bible Authors: David Elderbrock, David Karlins, Pages: 902, Published: 2001
SAP NetWeave Portal Technology: The Complete Reference Authors: Rabi Jay, Pages: 735, Published: 2008

Web:
Theme Development « WordPress Codex You can append any additional URI information to this output to reference files for your Theme, specifically those that are used by the stylesheet. ...
Themes: Stylesheet References - ASP.NET Forums Themes: Stylesheet References. Last post 03-11-2007 10:04 AM by Superfly1611. 4 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
15 Seconds : Code in Style with ASP.NET Themes Themes can include style sheet references. In that case, the style sheet definitions are applied along with other property values defined in the theme. ...
Including Cascading Stylesheets in Themes - Confluence 2.9 ... Confluence allows you to integrate your own stylesheets within the theme plugin ... To reference the stylesheet in the decorator, you will need to use the ...
Style Sheet and Graphics Reference for the SAS Winter Theme Style Sheet and Graphics Reference for the SAS Winter Theme. The SAS Winter theme includes several different style sheets and graphics files. ...
Theme Stylesheets - ASP.NET Forums If you have a stylesheet file within your theme folder, the element will be automatically added by ASP.Net at runtime with the reference to the ...
CiviCRM Forums - CiviMail Stylesheet Reference Error CiviMail Stylesheet Reference Error. ... ...
Stylesheets Section Most Stylesheets.Theme properties are referenced multiple times in the Stylesheets.System section. Using references reduces the work to create a Theme and ...
LAMS Themes or Skins - LAMS 2 - Confluence The theme objects are in the org.lamsfoundation.lams.themes package in lams.jar ... The standard use of the tag defines the stylesheet reference as a normal ...
Sandbox: Stylesheet Reference ... Stylesheet Reference Posted: May 12, 2008 12:00 PM ... There are versions for each UI Component theme, in theme named subdirectories. ...




Search This Site:










dinamic themes question

calling a sub on a content page

css background-image url location outside theme directory??

question on disabled skin controls

treeview error: class not registered

appearance of masterpages in vs 2005

how to access js files from a master page

asp.net newbie - whiney "help me" post

theme web.config

wizard control -- changing activestepindex doesn't seem to work

sub menu color in vs2005

treeview programatically change background color of node

site navigation

basepage versus masterpage

titles not showing up -- they're in the master page

security trimming problem with menu control

app themes request

masterpage/menu - content page getting cut off in firefox

master pages and server.execute don't get along.

site nav with unordered list and css

freezing header on master page

masterpage, viewstate & wizards control

png hack (with input type="image")

treeview component

how to fill a sitemappath control from a database?

treeview database

how to align to the right of an image using css

valid xhtml & treeview

easy question

form on master page?

  Privacy | Contact Us
All Times Are GMT