Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : 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
  #1 (permalink)  
Old April 24th, 2011, 04:41 AM
Registered User
 
Join Date: Apr 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question Implementing the NavigateURL Property, Chapter 8 ???

Imar,

This should be a quick question, i hope.

Using:
VS2010 Pro
SQL Server 2008 Developer

I've done the Implementing the NavigateURL Property "try it out" and it works. However, Visual studio is giving me an unsettling squiggly line in part of the new code.

Within the AboutUs.aspx.vb file the Banner2.NavigateURL has a blue-ish squiggly line under it with the warning/error: "'NavigateURL' is not a member of 'ASP.controls_banner_ascx'." What's the deal?

The block of code:
Partial Class About_AboutUs
Inherits BasePage

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Banner2.NavigateURL = "http://imar.spaanjaars.com"
End If
End Sub
End Class



Also, may be completely unrelated but within the MasterPage Frontend.master i was getting a warning that <LevelStyles> are not supported. Not sure about that one either. I commented the opening and closing tag out and the masterpage functionality doesn't seem to be affected. What are your thoughts on this?

Thank you,
Christopher
  #2 (permalink)  
Old April 24th, 2011, 04:48 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,
Quote:
What's the deal?
Could be a timing issue. Sometimes, VWD doesn't pick up changes like that. Try restarting VWD or rebuilding the website (right-click the project in the Solution Explorer and choose Build / Rebuild).

Quote:
What are your thoughts on this?
Could be the same isue. Sometimes VWD gets behind a bit with interpreting the IntelliSense options. Rebuilding the site, or reopening the page, or restarting VWD typically fixes these issues.

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!
  #3 (permalink)  
Old April 24th, 2011, 05:32 PM
Registered User
 
Join Date: Apr 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question Hmm, VS2010 still acting odd

Imar,

Well, you were right about the Banner2.NavigateURL block of code. When I restarted VS it stopped giving me the warning and the squiggly line went away.

However, I'm still getting an error on the <LevelStyles> tag within the Frontend.master file. The error reads: "Validation (XHTML 1.0 Transitional): Element 'levelstyles' is not supported.". I opened up your final version of the site within VS as a new web project and oddly enough I'm not getting the same warning. Any ideas about what I may need to do to remove the <LevelStyles> warning based on the error message described above?


Thank you,
Christopher
  #4 (permalink)  
Old April 24th, 2011, 06:12 PM
Registered User
 
Join Date: Apr 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Nevermind, I figured it out

Yeah, so I had:
Code:
 
<LevelStyles>
  <asp:TreeView ID="TreeView1" runat="server" CssClass="FirstLevelMenuItems" 
    DataSourceID="SiteMapDataSource1" ShowExpandCollapse="False">
  </asp:TreeView>
</LevelStyles>
And you had:
Code:
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" ShowExpandCollapse="False">
  <LevelStyles>
    <asp:TreeNodeStyle CssClass="FirstLevelMenuItems" />
  </LevelStyles>
</asp:TreeView>
It dawned on me that I had the final project file and maybe I should compare your final file with mine.

Christopher
  #5 (permalink)  
Old April 25th, 2011, 09:57 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

A, that makes sense.... :-)

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!


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with implementing Chapter 1: Login ninjask BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 3 April 30th, 2011 05:40 PM
ASP4-problems with NavigateUrl property stormage BOOK: Beginning ASP.NET 4 : in C# and VB 4 June 3rd, 2010 01:14 PM
Chapter 8 NavigateURl ChuckASP BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 March 7th, 2010 07:52 AM
Chapter 8 - Implementing ViewState Properties janla2112 ASP.NET 3.5 Basics 4 October 21st, 2008 03:57 PM





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