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: 2/21/2006 3:56:49 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 28 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
sam44
Asp.Net User
issue with master page and css2/21/2006 3:56:49 PM

0/0

Hello,
I have a master page:

<%@ Master Language="VB" CodeFile="dRise.master.vb" Inherits="dRise" %>

<%  Response.Write(Header)%>

    <form id="form1" runat="server">
    <div class="FormContent">
        <asp:contentplaceholder id="ReportWizard" runat="server">
        </asp:contentplaceholder>
    </div>
    </form>
 
<%  Response.Write(Footer)%>

Code-behind:

Partial Class dRise
    Inherits System.Web.UI.MasterPage

    Private m_header As String
    Private m_footer As String

    Property Header() As String
        Get
            Return m_header
        End Get
        Set(ByVal value As String)
            m_header = value
        End Set
    End Property

    Property Footer() As String
        Get
            Return m_footer
        End Get
        Set(ByVal value As String)
            m_footer = value
        End Set
    End Property

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        m_header = "<html><head runat=""server""></head><body>"
        m_footer = "</body></html>"
    End Sub
End Class

Now, all my pages have a css file located in the App_Themes directory. Theme is specified in the web.config file:
 <pages theme="dRise">

When I load my page, it raises the following exception:

Using themed css files requires a header control on the page. (e.g. <head runat="server" />).

If I remove the theme option from <pages theme="dRise"> then the page loads correctely.
I don't understand because the header markup is there, in m_header.
Can you help ?



ScottGu
Asp.Net User
Re: issue with master page and css2/22/2006 6:26:55 AM

0/0

Hi Sam,

Themed CSS requires that a <head runat="server"/> server control be placed within the .master file.  It then relies on this to emit the .css reference.

Hope this helps,

Scott

2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Visual Web Developer 2005 Express Edition For Dummies Authors: Alan Simpson, Pages: 358, Published: 2005
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Dreamweaver 8 For Dummies: style pages with CSS, add multimedia elements and more Authors: Janine Warner, Pages: 425, 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
Beginning ASP.NET 2.0 with C# Authors: Chris Hart, John Kauffman, David Sussman, Chris Ullman, Pages: 735, Published: 2006

Web:
Codefixer - Master Pages with CSS Using Master Pages ASP.NET 2.0 with Stylesheets to create a fairly straightforward 2 column CSS layout for your website.
Master page and CSS link strange problem. Talk about Master page and CSS link strange problem.
Masterpage and CSS problem : css,asp.net I created a page using CSS that comes out fine in a browser but when I try to incorporate it into masterpages, I'm experiencing some problems.
Issue with CSS and Multiview in a Content page using a Masterpage ... Issue with CSS and Multiview in a Content page using a Masterpage, > ROOT > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2008, ...
CSS Options with Master Pages 'cause it seems that the core.css is loaded after my css file, even when I "Link to the style sheet through Master Page settings" Is is a known issue ? ...
VS 2008 Nested Master Page Support - ScottGu's Blog Using the Above HTML/CSS Template with Nested Master Pages ..... Thanks for forwarding this issue - someone on the team is now looking at how to add support ...
CleverWorkarounds » SharePoint Branding - How CSS works with ... MASTER issue. Additionally, different semi-autonomous divisions within the client’s ..... I have customised a master page and css for a branding exercise. ...
Wouter van Vugt : Problems laying out a MasterPage using CSS Aug 16, 2005 ... Phew, developing my homepage with ASP.NET 2.0 sure confronts me with lots of small defects and minor annoyancies. This time with laying out ...
Creating a Layout Using Master Pages - ASP.NET 2.0 Quickstart ... The Master Page has been updated to use server controls in place of HTML: Moving layout files (master pages, page layouts, CSS, etc.) in a ... I belive it is true in case of if we have new master page or css flie but ..... I found an interesting issue - if you deploy a masterpage using features and ...

Videos:
Adding css style to ASP.NET master page In this video you will learn how to add a color scheme to the master page so it pleases the eye.
Modify a Master Page in SharePoint Designer 2007 In this video you will learn how to use SharePoint Designer to modify and re-brand a SharePoint default.master page. For more information, see ...
MOSS UI Tutorial: Part 1 of 10 PART 1: MASTER PAGE OVERVIEW AND CUSTOM DESIGN EXAMPLES. (This is a 10-part tutorial series on applying custom visual design to a MOSS website ...
MOSS UI Tutorial: Part 2 of 10 PART 2: PREPPING HTML/CSS TEMPLATES FOR MOSS. (This is a 10-part tutorial series on applying custom visual design to a MOSS website. Supplimental ...
Make a web page in 10 minutes http://www.aptune.com presents how to make a web page with html css and photoshop in 10 minutes with web master Allen Patterson
MOSS UI Tutorial: Part 3 of 10 PART 3: PREPPING THE FILES IN SHAREPOINT DESIGNER. (This is a 10-part tutorial series on applying custom visual design to a MOSS website ...
MOSS UI Tutorial: Part 4 of 10 PART 4: BASE MASTER PAGE CODE OVERVIEW. (This is a 10-part tutorial series on applying custom visual design to a MOSS website. Supplimental files ...
Work with SharePoint Master Pages with SharePoint Designer SharePoint Master Pages allow you to create a customized look and feel (format, CSS, etc) for your site. This tutorial reviews how to use the ...
MOSS UI Tutorial: Part 5 of 10 PART 5: USING THE BASE MASTER PAGE TO CREATE A CUSTOM MASTER PAGE. (This is a 10-part tutorial series on applying custom visual design to a MOSS ...
Make a Web Page in 10 Minutes http://www.aptune.com Make a Web Page in 10 minutes using a text editor, photoshop, html and css presented by web master Allen Patterson.




Search This Site:










layout

masterpage url

save/load general preferences/properties

onmenuitemclick causing postback all the time

skin files

creating and accessing objects from master pages

sitemap, menu and treeview question

causes validation property not present in menu navigation control

masterpage

replacing text with image on menu navagation

iterate hotspot collection?

treview positioning.

masterpage is not updating content

nested masterpage problem

styles

calling code-behind functions from aspx page

master page not showing

session var in masterpages

what is problem with runat=server ??

master page with images

where to place css reference in content panel

can menu control be animated?

treeview control

right aligment of dynamicmenu (submenu) of horizontal menu

compatibility problems between master pages and freetextbox??

css for a button

menuitem clickevent-postback

theme won't work

invoke javascript function from master page

a simple master/page content question

  Privacy | Contact Us
All Times Are GMT