Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 20th, 2013, 04:24 PM
Authorized User
 
Join Date: Jan 2013
Posts: 29
Thanks: 1
Thanked 1 Time in 1 Post
Default Levelstyles is not supported.

I'd forgotten about this, but came across it again when finishing up one of the later chapters. On page 271, you direct to add the <LevelStyles> tag for the TreeView of the Planet Wrox page. This prompts the following warning from VS2012:

Warning 1 Validation (XHTML5): Element 'levelstyles' is not supported. D:\BEGASPNET\Site\MasterPages\Frontend.master 26 14 D:\BEGASPNET\Site\

What would a XHTML5-compliant version of this command be, if there is one?
 
Old February 20th, 2013, 04:59 PM
Authorized User
 
Join Date: Jan 2013
Posts: 29
Thanks: 1
Thanked 1 Time in 1 Post
Default

Also on page 625 you have:

"minRequiredPasswordLength Determines the minimum length of the password. Defaults to 7."

It defaults to 6, not 7. This was actually stated a bit earlier in the text (top of page 610.)
 
Old February 20th, 2013, 05:09 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Can you post the code for the page? LevelStyles works fine for me without a warning message.

With regards to minRequiredPasswordLength: it does actually default to 7 inside the provider's code. So, if you don't supply a value at all, it defaults to 7. This is introduced briefly above the table on page 624. The web.config code that is added when you add the provider overrides that default and sets it to 6.

BTW: this last question would have been better off as new topic to make it easier for others to find stuff.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old February 20th, 2013, 05:24 PM
Authorized User
 
Join Date: Jan 2013
Posts: 29
Thanks: 1
Thanked 1 Time in 1 Post
Default

Sure. Here's the code for the Frontend.Master file:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Frontend.master.cs" Inherits="Frontend" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<script src="/Scripts/modernizr-2.6.2.js"></script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
<Scripts>
<asp:ScriptReference Name="jquery" />
</Scripts>
</asp:ScriptManager>
<div id="PageWrapper">
<header><a href="/"></a></header>
<nav>
<asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False"></asp:Menu>
<LevelStyles>
<asp:TreeView ID="TreeView1" runat="server" CssClass="FirstLevelMenuItems" DataSourceID="SiteMapDataSource1" ShowExpandCollapse="False"></asp:TreeView>
</LevelStyles>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
</nav>
<section id="MainContent">
<asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath><br /><br />
<asp:ContentPlaceHolder id="cpMainContent" runat="server">
</asp:ContentPlaceHolder>
</section>
<aside id="Sidebar">
<asp:DropDownList ID="lstThemes" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedInde xChanged">
<asp:ListItem>Monochrome</asp:ListItem>
<asp:ListItem>DarkGrey</asp:ListItem>

</asp:DropDownList>
<br />
<br />
<br />
<Wrox:Banner ID="Banner1" runat="server" DisplayDirection="Vertical" />
</aside>
<footer>
<asp:LoginName ID="LoginName1" runat="server" FormatString="Logged in as {0}" />
<asp:LoginView ID="LoginView1" runat="server">
<LoggedInTemplate>
(<asp:LoginStatus ID="LoginStatus1" runat="server" />)
</LoggedInTemplate>
</asp:LoginView>
</footer>
</div>
<asp:ContentPlaceHolder id="cpClientScript" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>
 
Old February 20th, 2013, 05:31 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Take a look at this:

Code:
<LevelStyles>            
                    <asp:TreeView ID="TreeView1" runat="server"  CssClass="FirstLevelMenuItems" DataSourceID="SiteMapDataSource1"  ShowExpandCollapse="False"></asp:TreeView>
                </LevelStyles>
You put the TreeView inside LevelStyles instead of the other way around.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old February 20th, 2013, 05:42 PM
Authorized User
 
Join Date: Jan 2013
Posts: 29
Thanks: 1
Thanked 1 Time in 1 Post
Default

Ah, I see the issue. Thanks.
 
Old February 28th, 2016, 05:30 PM
Registered User
 
Join Date: Feb 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Still have problem

I have the same problem. Please paste what the code should look like.
 
Old February 28th, 2016, 06:12 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If you have the exact problem, it should look like this:

Code:
<asp:TreeView ID="TreeView1" runat="server"  CssClass="FirstLevelMenuItems" DataSourceID="SiteMapDataSource1"  ShowExpandCollapse="False">
  <LevelStyles></LevelStyles>
</asp:TreeView>
Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyword not supported: 'provider' Flyby09 BOOK: Professional ASP.NET 4 : in C# and VB 1 February 14th, 2012 05:15 PM
ProfileCommon not Supported Chris_Alis BOOK: Professional ASP.NET 4 : in C# and VB 2 September 26th, 2011 02:15 PM
Is this book still supported? JasonRawlins BOOK: ASP.NET AJAX Programmer's Reference : with ASP.NET 2.0 or ASP.NET 3.5 ISBN: 978-0-470-10998-4 1 April 1st, 2009 08:56 PM
Keyword not supported: 'provider'. bam1934 ASP.NET 1.0 and 1.1 Basics 1 May 27th, 2005 12:01 AM
recordcount attribute supported alyeng2000 SQL Server 2000 0 November 18th, 2003 12:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.