Wrox Programmer Forums
|
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
 
Old March 7th, 2012, 02:46 PM
Authorized User
 
Join Date: Feb 2012
Posts: 22
Thanks: 0
Thanked 4 Times in 4 Posts
Default Help with Chapter 15

I am working through the second try it out when I try to view the Genres.aspx page in the browser this is the error message i get.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The 'ID' property of a control type System.Web.UI.WebControls.GridView cannot be applied through a control skin.

Source Error:


Line 1: <asp:GridView ID="GridView1" runat="server" CssClass="GridView">
Line 2: <HeaderStyle CssClass="GridViewHeaderStyle" />
Line 3: <PagerStyle CssClass="GridViewPagerStyle" />


Source File: /App_Themes/Management/GridView.skin Line: 1

It seems it is telling me that this is not a proper use of the asp tag GridView am I doing something wrong?

do I need a using statement in the skin file

Code:
<asp:GridView ID="GridView1" runat="server" CssClass="GridView">
  <HeaderStyle CssClass="GridViewHeaderStyle" />
  <PagerStyle CssClass="GridViewPagerStyle" />
  <SortedAscendingHeaderStyle CssClass="GridViewSortedAscendingHeaderStyle" />
  <SortedDescendingHeaderStyle CssClass="GridViewSortedDescendingHeaderStyle" />
</asp:GridView>
is the current of my GridView.skin

I also get this warning in the error list window

Warning 1 E:\Websites\BegASPNET\App_Themes\Management\GridVi ew.skin: ASP.NET runtime error: There is no build provider registered for the extension '.skin'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'. E:\Websites\BegASPNET\App_Themes\Management\GridVi ew.skin 1 1 E:\Websites\BegASPNET\
 
Old March 7th, 2012, 03:06 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,

For the error, take a look at page 233. Controls defined in a Skin file can't have ID attributes.

For the build warning, take a look at page 234....

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!
The Following User Says Thank You to Imar For This Useful Post:
dansivan (July 27th, 2012)
 
Old March 7th, 2012, 03:53 PM
Authorized User
 
Join Date: Feb 2012
Posts: 22
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Thanks Imar but now I have another problem with it

I get the following error message with when I try to view the Genres.aspx in the browser

Line: 105
Error: Object expected

This is asscoiated with the jquery script at the bottom of the page when I choose to enter the debugger the whole script is highlighted in yellow right after the script tag.
 
Old March 7th, 2012, 03:59 PM
Authorized User
 
Join Date: Feb 2012
Posts: 22
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Never mind I got it working bad refference to the script file in the master page thanks for you help Happy Conding





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 15 thepianoguy BOOK: Professional iPhone and iPad Application Development 2 April 16th, 2011 07:39 AM
chapter 15 manal_sag BOOK: Beginning ASP 3.0 2 March 13th, 2006 04:48 PM
Chapter 15 rrlevron BOOK: Beginning ASP 3.0 0 November 17th, 2005 03:38 PM
Chapter 15!! studentinpain BOOK: Beginning ASP 3.0 16 March 12th, 2004 10:26 AM
Chapter 15 help Lorenzo_G BOOK: Beginning ASP 3.0 1 November 27th, 2003 01:00 PM





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