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: 8/18/2006 2:10:28 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 21 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
MyronCope
Asp.Net User
MasterPage, styles, and controls8/18/2006 2:10:28 PM

0/0

I'm adding pages to an existing .Net 2.0 project where I'm using an Navigation control, and I need to use the existing style sheet called commons.css for all pages.  The problem I have is that when I run my existing default page using the common.css style then it styles the SideNavigation control correctly,  but when I include the sideNavigation control in the master page and then use that master page to create a new page I'm not seeing the style being applied to the sidenav control.

However, I need to use Master pages because I have many pages to create and I am required to have a common look and feel for all pages.  I'm including the common.css style which styles the sidenavigation control in the master page but I dont see the styles being used in pages I create with master page.

 I am particularly concerned about the SideNavigation control that I call from the Master page.  The example that I'll used and show at the bottom will be my contact page, but first  In the master pages I use the following:

<CODE>

<%

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

<%

@ Register TagPrefix="uc1" TagName="SideNavigation" Src="Controls/SideNavigation.ascx" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml" >

<

head runat="server">

<title id="Title1" runat=server></title>

<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">

<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">

<meta content="JavaScript" name="vs_defaultClientScript">

<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">

<link href="Styles/submission.css" type="text/css" rel="stylesheet">

<link href="Styles/common.css" type="text/css" rel="stylesheet">

<script language="javascript" src="/ProjectName/Controls/sideNavigation.js"></script>

</

head>

<body>

<form id="Form1" method="post" runat="server">

<TABLE height="30" cellSpacing="0" cellPadding="0" width="100%" border="0">

<tr>

<td vAlign="top" align="left" colSpan="2" height="50">

<asp:Image ID="imgHeader" runat="server" ImageUrl="~/Images/finalBanner.jpg">

</asp:Image>

</td>

</tr>

<tr>

<td height="3" bgcolor="#f85100">

</td>

</tr>

</TABLE>

<table cellSpacing="0" cellPadding="0" border="0" >

<TR>

<TD vAlign="top" width="180">

<uc1:SideNavigation ID="ucSideNav" runat="server">

</uc1:SideNavigation>

</TD>

<TD vAlign="top" bgcolor="white">

<asp:ContentPlaceHolder ID="cphTopLvl" runat="server">

</asp:ContentPlaceHolder>

</td>

</tr>

<tr>

<td vAlign="top" align="right" colSpan="2" height="10">

<!-- #include File="includes/bottomnavigation.html"-->

</td>

</tr>

</table>

</form>

</body>

</

html>

</CODE>

And in the contact page where I am not seeing the common.css style being applied to the SideNavigation control I have the following html code:

<CODE>

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="Contact.aspx.vb" Inherits="Contact" MasterPageFile="~/MasterPage.master"%>

<

asp:Content runat=server ContentPlaceHolderID="cphTopLvl">

<table height="100%" width="100%">

<tr>

<td class="centralArea" vAlign="top">

<h2>

Contact

</h2>

</P>

<!-- contact information here-->

</table>

</

asp:Content>


</CODE>

Is it clear to anyone why I"m not able to view the styles for sidenav when I use the master pages instead of calling the nav control directly?  The style used in the master page should filter down to the contact page and then display properly when I visit the contact page but this is not happening.

I'm really stumped here and need to figure this out soon for work. 

  Thanks.

1 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
Real World SharePoint 2007: Indispensable Experiences from 16 MOSS and WSS MVPs Authors: Scot Hillier, Robert Bogue, Adam Buenz, Andrew Connell, Stacy Draper, Luis Du Solier Grinda, Todd O. Klindt, Jason Medero, Dustin Miller, Shane Perran, Joris Poelmans, Heather Solomon, Nick Swan, Jan Tielens, Mike Walsh, Shane Young, Pages: 478, Published: 2007
Microsoft Office SharePoint Server 2007: The Complete Reference Authors: David Matthew Sterling, Pages: 788, Published: 2007
Beginning ASP.NET 2.0 with C# Authors: Chris Hart, John Kauffman, David Sussman, Chris Ullman, Pages: 735, Published: 2006
Professional Community Server Themes Authors: Wyatt Preul, Benjamin Tiedt, Pages: 337, Published: 2007
InDesign CS2 at Your Fingertips: At Your Fingertips Authors: Ted LoCascio, Pages: 402, Published: 2005
Microsoft Publisher 2007 for Dummies Authors: Jim McCarter, Jacqui Salerno Mabin, Pages: 366, Published: 2007
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Pro ASP.NET 2.0 Website Programming Authors: Damon Armstrong, Pages: 641, Published: 2005
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008

Web:
menu control in master page does not get styles in ie 6.0 - ASP ... Considering that these styles are autogenerated by .net, (by concatenating the master page place holder name to the menu id and adding a _) ...
CSS Options with Master Pages My recommendation is to store styles in the master page itself in a set of STYLE .... you have to put your own webcontrol which inherits from this control. ...
Dave Murray Miyamasu's ASP.NET Developer Blog: Change Master Page ... Jan 22, 2008 ... One way that you can dynamically change the Masterpage content (i.e. add/remove asp controls, change style values) is to determine the ...
CSS Styles in MasterPage Talk about CSS Styles in MasterPage. ... use server controls for everything, and that one might want to run the ...
Create a master page When you create a master page, you can lay it out, apply styles, and add ASP.NET controls in the same way that you would with other pages in Microsoft ...
Applying stylesheet styles to master page Re: Applying stylesheet styles to master page. Unfortunately, that throws an error for me at : Page.Header.Controls.Add(link); ...
Master Page of Master Page Links - SharePoint BUZZ - Your ... Master pages contain controls that are shared across multiple page layouts, ... Building a Custom Master Page; Adding Cascading Style Sheets ...
Change style of server controls on Master page : ASP.Net : C#, IE7 Hi, What I'm trying to do is put tabs on a website, where one tab is uniqely highlighted based on the content displayed. This site (experts-exchange) is a ...
SharePoint – User Control in Master Page (Page Footer) [21/01/2008] SharePoint – User Control in Master Page (Page Footer) ... So now we have our CSS style added and with the existing styles I already have on ...
4 MasterPages,SkinsAndThemes Themes • Themes are used to specify styles for the controls and text of the page. ...




Search This Site:










how to stop postback the treeview ?

any idea why skin doesn't apply on my gridview with adapter?

need to limit menu items by login

do not cache login-details in masterpage

using masterpage without design time feature..

masterpage, styles, and controls

custom attribute to sitemap datasource

css and content pages

how to use sitemap control?

menu control adding extra table cells

defaultbutton in masterpage

stop master page screen refresh on menu selection....please help...

root master page and re-use root master page in child project

help with css button color scheme

menu in masterpage - hide a menu item - vb

help w/ vb class populating content pages

moving gif images stop moving

calling fuction in child page from master page

problem centering table inside an contentplaceholder on masterpage

sitemap control

removing specific treeview nodes based on custom attributes using treenodedatabound

javascript problem

master pages ?

using theme to define bordercolor for itemstyle on boundfield

how to open a pdf file in a content page asp.net

code for multiple sitemap providers

<center> and style position absolute - changing window sizes??

disabled design-time masterpage.

using response.write in a page_load event of a content page

treeview and manual databinding

  Privacy | Contact Us
All Times Are GMT