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 May 12th, 2014, 12:28 PM
Registered User
 
Join Date: Apr 2014
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 15 No Alternate color lines

I am not getting alternate color lines in the Genres' GridView as shown on page 554 fig. 15-2

In the GridView.skin I am seeing a warning:

C:\BegASPNET\Site\App_Themes\Management\GridView.s kin: 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'.

Could this be the reason there are no alternatin colors?

Thanks
 
Old May 13th, 2014, 06:02 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Tony,

The warning is by design because you associated skins with the User Control editor. Page 247 mentions this briefly. You can safely ignore this warning.

Can you post your code for alternate color lines? It may be an issue with casing but it's hard to say without seeing your code.

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 May 13th, 2014, 02:21 PM
Registered User
 
Join Date: Apr 2014
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Under the GridView1 code I found this:
<asp:GridView ID="GridView1" ...
<AlternatingRowStyle BackColor="White" />


When I changed White to another color lightgreen the alternating lines show up.

The code seems not to be able to find the code in the Management.css file:
.GridViewAlternatingRowStyle
{
background-color: #e1e1e1;
}


<script type="text/javascript">
$(function () {
$('.GridView tr:odd:not(.GridViewPagerStyle)').addClass('GridVi ewAlternatingRowStyle');
});
</script>


That's all I can figure out.

Thanks
 
Old May 13th, 2014, 07:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Looks like you missed an earlier step that explained how to remove the various style templates. Your current AlternatingRowStyle creates an in-line style which overrules external styles. Simply remove that style from the GridView and it should work.

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
Alternate Answer to Exercise 5 in Chapter 3 benhelfman BOOK: Beginning Visual C# 2010 0 December 22nd, 2012 05:25 AM
Chapter 4 - customizing ToDoList - ruled lines not working correctly gregking BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 1 April 3rd, 2009 09:44 AM
chapter 10 - Alternate order walabok BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 March 19th, 2008 12:04 PM
could you explain me two lines in chapter 7 thanks migra BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 0 October 10th, 2006 07:52 AM





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