CodeVerge.Net Beta


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




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 6/11/2007 5:48:18 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 52 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
HummingBird
Asp.Net User
Nested Master pages and HtmlLink6/11/2007 5:48:18 PM

0

I have 3 different menus on the home page.  I have a master page for the home page and another master page for the Category layout.  I have created a nested master page for each Category menu link item.  There is a content .aspx content page which corresponds.

Navigation works fine but I am challenged as to how and where to associate my style sheet code for the menu and content grid.

Should I be using HtmlLink as I am unable to use in nested page as in site.master.  Could you suggest where I should be inserting my variable code.

(HtmlLink Format)

<%@ Page Language="C#"%>

<script runat="server">

  protected void Page_Init(object sender, EventArgs e)

  {

    // Define an HtmlLink control.

    HtmlLink myHtmlLink = new HtmlLink();

    myHtmlLink.Href = "~/StyleSheet.css";

    myHtmlLink.Attributes.Add("rel", "stylesheet");

    myHtmlLink.Attributes.Add("type", "text/css");

    // Add the HtmlLink to the Head section of the page.

    Page.Header.Controls.Add(myHtmlLink);

</script>

<script>

 

Thanks in advance for your patience.

Bold novice (HummingBird)

 (site.master)

<head runat="server">

    <title></title>

<link href="CSS/master.css" rel="stylesheet" type="text/css" />

<link href="CSS/CatNav/catnavmenu.css" rel="stylesheet" type="text/css" />

<link href="CSS/Category/category.css" rel="stylesheet" type="text/css" />

<link href="CSS/CorpNav/CorpNav.css" rel="stylesheet" type="text/css" />

<link href="CSS/CorpNav/Footer.css" rel="stylesheet" type="text/css" />

<style type="text/css">

???.

<div id="divCatNavMenu"  align =center>      <asp:HyperLink         id="lnkITEMA"         Text="Events"         NavigateUrl="~/Link_A.aspx"         Runat="server" />

    <asp:HyperLink

 (Link_aMenu.Master)<%@ Master Language="C#" MasterPageFile="~/Site.master" %> <asp:Content    id="Content1"    ContentPlaceHolderID="cphCategory"    Runat="server">    <div class="catnavmenu">        <asp:ContentPlaceHolder            id="ContentPlaceHolder1"            Runat="server" />    </div>    </asp:Content> (Link_A.aspx)<%@ Page Language="C#" MasterPageFile="~/MasterPages/Link_aMenu.master" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">    <table>    </table>

</asp:Content>

 

 

Amanda Wang - M
Asp.Net User
Re: Nested Master pages and HtmlLink6/14/2007 3:34:28 AM

0

Hi,

You could use the theme or skin in your page for the HtmlLink  style.

<%@ Page Language="C#"%>

<script runat="server">

  protected void Page_Init(object sender, EventArgs e)

  {

    // Define an HtmlLink control.

    HtmlLink myHtmlLink = new HtmlLink();

    myHtmlLink.SkinID=" Skin";

    // Add the HtmlLink to the Head section of the page.

    Page.Header.Controls.Add(myHtmlLink);

</script>

<script>

You also apply a theme to a Web site, like below:

<pages theme="SkinFile" styleSheetTheme="SkinFile"></pages>


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Oracle9iAS Portal Bible Authors: Rick Greenwald, James Milbery, Pages: 984, Published: 2001

Web:
Nested Master pages and HtmlLink - ASP.NET Forums Nested Master pages and HtmlLink. Last post 06-13-2007 11:34 PM by Amanda Wang - MSFT. 1 replies. Sort Posts: ...
British Inside : Nested Master Pages and ScriptsEtc Aug 30, 2006 ... Instantiating an HtmlLink and adding it to the Page. ... That works great, except that I have nested master pages that might work like this: ...
Terry Thibodeau's Blog : Visual Studio HTML link creation macro Dec 19, 2007 ... Visual Studio HTML link creation macro ... I'm using nested Master Pages and have a ContentPlaceHolder inside another ContentPlaceHolder (to ...
Applying stylesheet styles to master page I've a a site with nested master pages and content pages. I tried using ... HtmlLink link = new HtmlLink(); link.Href = "~/StyleSheet.css"; ...
Introduction to .NET Framework 3.0/Contents/An Overview of Master ... The designed doesn't support nesting of master pages; however, ... and replace it with the appropriate control type (HtmlLink, HtmlMeta, etc. ...
ASP.Net 2.0 - Master Pages: Tips, Tricks, and Traps Apr 11, 2006 ... Dim cssLink As New HtmlLink() cssLink.Href = "~/styles.css" ..... Although nested master pages work at runtime, they do not work in the ...
Scott Allen HtmlLink cssLink = new HtmlLink();. cssLink.Href = "/vslive.css";. cssLink. ... Nested master pages not supported in. VS2005. – Does work in Orcas ...
MasterPage content - ASP.NET Forums I'm using nested master pages, and I need to specify a different stylesheet for the .... HtmlLink stylesheetControl = (HtmlLink)Page.Master. ...
ASP.NET: HtmlHead ControlAdapters implementation 1) Some html didn't render with nested master pages. 2) ASP. ... AttributeCollection attributes = ((HtmlLink)this.Control).Attributes; if (null! ...
ASP.NET Master Pages Explanation Needed Please. : have I am having some trouble grasping the idea of master pages. ... top-level controls in a content page or a nested master page that references a master page . ...






can connectionstring be in the one place in asp.net?????

find child object type using parent properties

for loop problem

session variables

voip api's

using cookies as "favorites" for users

verifiying data for diy login system

vb versus vb script question

how to convert uniqueidentifier to string?

sessions in codebehind (problems)

logic error

how do i declare an integer in c#?

godiagram with .net

webdav query for opening an appointment in a calendar on exchange server

find control - gridview - edit mode

http-get string

class functions

postback question

validating checkbox

selecting previously uploaded files as link

dim variable in codebehind and use it in your hmtl code?

a problem with setting selected value of drop down list box

how hard is it to add an updatepanel after the fact?

urgent problem with string.split method

html formated mail .

dynamic display of a user logo

determining a dynamic table.height's value in code-behind...

asp .net problem

hiding querystring for extra security

forms based authentication

   
  Privacy | Contact Us
All Times Are GMT