TreeView HoverStyle

Discussion in 'ASP .Net Web Controls' started by Morris Neuman, Jun 27, 2009.

  1. Hi,

    I am using Expression Web 2 to develop my website.

    I am trying to set the HoverStyle for my TreeView on my downloads.aspx page.
    I get error
    "Using TreeView.HoverStyle requires Page.Header to be non-null (e.g. <head
    runat="server" />).
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information about
    the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: Using
    TreeView.HoverStyle requires Page.Header to be non-null (e.g. <head
    runat="server" />)."

    I have used treeview and don't get error if I don't use the HoverStyle.
    What do I need to add and why?


    My page details are as follows:
    <%@ Page Language="C#" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link href="style.css" rel="stylesheet" type="text/css" />
    <link href="layout.css" rel="stylesheet" type="text/css" />
    </head>
    <body id="page6">
    <form id="form1" runat="server">

    <div id="main">
    <!-- header -->
    <div id="header">
    <p>www.speechsoft.com</p>
    <ul id="navi">
    <li><a href="aboutSS-contacts.html">About Us</a></li>
    <li><a href="aboutSS-contacts.html">Contact</a></li>
    <!--<li><a href="#">sIGN iN</a></li>-->
    <!--<li><a href="#">sEARCH</a></li>-->
    <!--<li><a href="#">HELP</a></li>-->
    <!--<li><a href="#">faq</a></li>-->
    </ul>
    <a href="index.html"><img src="images/logo.gif" id="logo" alt="" /></a>
    </div>
    <!-- content -->
    <div id="content">
    <div class="wrapper">
    <div id="left-column">
    <h2><span>Downloads</span></h2>
    <ul class="list-1">
    <li>
    <h6>CALLMaster</h6>
    <asp:TreeView id="TreeView1" runat="server">
    <HoverNodeStyle Font-Bold="False" Font-Underline="True" />
    <Nodes>
    <asp:treenode Expanded="True" Text="Software" Value="Software">
    </asp:treenode>
    <asp:treenode ShowCheckBox="False" Text="Document" Value="Document">
    <asp:treenode NavigateUrl="Documents/CALLMaster-Brochure.pdf"
    Text="CALLMaster Brochure" Value="CALLMaster Brochure">
    </asp:treenode>
    </asp:treenode>
    </Nodes>
    </asp:TreeView>
    </li>
    <!--<li class="extra">
    <h5>12.12.2006 - Donec accumsan</h5>
    <p>Lorem ipsum dolor sit amet, consectet uer adipiscing elit.
    Mauris fermen tum dictum magna. Aenean </p>
    </li>-->
    </ul>
    <a href="#" class="link-2"><span><span>More
    solutions</span></span></a>
    </div>
    </div>
    </div>
    </div>
    </form>

    </body>
    </html>



    --
    Thanks
    Morris
    Morris Neuman, Jun 27, 2009
    #1
    1. Advertising

  2. Hi Morris,

    >I am trying to set the HoverStyle for my TreeView on my downloads.aspx

    page.
    > I get error


    To use HoverNodeStyle we must include a <head> element with a
    runat="server" attribute. For example you can use this header to replace
    your current one:

    <head runat="server" id="head">

    For more details please refer to:

    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.h
    overnodestyle.aspx

    Regards,
    Allen Chen
    Microsoft Online Support

    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

    Note: MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 2 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions. Issues of this
    nature are best handled working with a dedicated Microsoft Support Engineer
    by contacting Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Allen Chen [MSFT], Jun 29, 2009
    #2
    1. Advertising

  3. Thanks. That worked.
    --
    Thanks
    Morris


    "Allen Chen [MSFT]" wrote:

    > Hi Morris,
    >
    > >I am trying to set the HoverStyle for my TreeView on my downloads.aspx

    > page.
    > > I get error

    >
    > To use HoverNodeStyle we must include a <head> element with a
    > runat="server" attribute. For example you can use this header to replace
    > your current one:
    >
    > <head runat="server" id="head">
    >
    > For more details please refer to:
    >
    > http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.h
    > overnodestyle.aspx
    >
    > Regards,
    > Allen Chen
    > Microsoft Online Support
    >
    > Delighting our customers is our #1 priority. We welcome your comments and
    > suggestions about how we can improve the support we provide to you. Please
    > feel free to let my manager know what you think of the level of service
    > provided. You can send feedback directly to my manager at:
    > .
    >
    > ==================================================
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
    >
    > Note: MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 2 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions. Issues of this
    > nature are best handled working with a dedicated Microsoft Support Engineer
    > by contacting Microsoft Customer Support Services (CSS) at
    > http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    > ==================================================
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    >
    >
    Morris Neuman, Jun 30, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VHltYm93?=
    Replies:
    2
    Views:
    24,451
    =?Utf-8?B?VHltYm93?=
    Jan 10, 2006
  2. Progman

    Hoverstyle

    Progman, Mar 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    467
    Progman
    Mar 10, 2006
  3. abargaddon
    Replies:
    0
    Views:
    1,051
    abargaddon
    Jan 17, 2008
  4. Per Salmi

    TreeView not rendering nodes? Cacheing of a TreeView

    Per Salmi, Oct 15, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    459
    Steve Drake
    Oct 15, 2003
  5. Ionutz
    Replies:
    2
    Views:
    528
    Ionutz
    Oct 23, 2005
Loading...

Share This Page