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 April 26th, 2013, 04:29 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default Using strictly the downloaded code..

that I got from the Wrox website for this book, I keep getting a run time error as the application keeps crashing on me. I get following runtime warning:
Warning 2 C:\BegASPNET\Chapter 14\App_Themes\Management\GridView.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'. C:\BegASPNET\Chapter 14\App_Themes\Management\GridView.skin 1 1 C:\BegASPNET\Chapter 14\

And I get the following runtime error
Server Error in '/Chapter 14' Application.
On page 560 of the book.
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="GridviewSkin" runat="server" CssClass="GridView">
Line 2: <HeaderStyle CssClass="GridViewHeaderStyle" />
Line 3: <PagerStyle CssClass="GridViewPagerStyle" />

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

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18034

Last edited by vbboyd; April 26th, 2013 at 04:36 PM.. Reason: additional information
 
Old April 27th, 2013, 09:13 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Does it really crash? And at run-time? Or do you just get a warning at design time in Visual Studio?

For the first issue, check out page 247.

For the second issue, check out page 246 / 247. In addition, check the last sentence of step 5 o page 560 and the code example that follow.

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 April 27th, 2013, 09:37 AM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default Okay so now I found the problem

I was using your code because the VS environment was throwing an error message, I guess a warning, which has means that you will have a run time error if you try to run the program. So I was copying and pasting your code into my .skin file and unbeknownst to me Visual Studio was automatically putting an ID value in there as soon as I pasted your code from your .skin file to my .skin file. I removed the ID from the skin file and that fixed the problem.

Last edited by vbboyd; April 27th, 2013 at 09:51 AM.. Reason: more info
 
Old April 27th, 2013, 09:51 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

>> I guess a warning, which has means that you will have a run time error if you try to run the program.

Nope; that shouldn't be the case. It should be a warning at design time only, and it should have no effect at runtime. Are you seeing something else?

>> Visual Studio was automatically putting an ID value in there as soon as I pasted

Yep; you find a warning about that on page 248...

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
Problems with downloaded code crashbandicoot BOOK: Beginning HTML, XHTML, CSS, and JavaScript 8 September 18th, 2012 07:57 PM
opening downloaded code mxk4701 BOOK: Java Programming 24-Hour Trainer by Yakov Fain 1 April 2nd, 2012 05:35 AM
downloaded code Joseph BOOK: Beginning SQL 5 December 23rd, 2007 09:35 PM
strictly for date entry only Rudner Pro VB 6 6 February 28th, 2006 09:25 AM
Problem with downloaded code Jags ADO.NET 1 April 10th, 2005 03:56 PM





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