 |
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
|
|
|
|
|

October 23rd, 2012, 12:15 PM
|
|
Authorized User
|
|
Join Date: Oct 2012
Posts: 19
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
Chapter 15 - Try it out - p. 537 (java script)
My result is different from the previous post in this area. When I bring up Genres.aspx I see the up and down arrows but not the alternating stripes. When I use IP for the browser I receive an error message that the function $ is undefined (from the jQuery code). The error message is SCRIPT5009. When I use Chrome as the browser there is no error message but still no alternating stripes. Any ideas as to the source of this problem?
A related question: In the management.css file there is an entry for:
.GridView, .GridView a
{...}
Wouldn't just plain .GridView accomplish the same result since .GridView a is a subset of .GridView
|
|

October 24th, 2012, 06:43 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, but the a element is styled elsewhere as well. By specifically targeting a elements within the GridView, it gets a higher "specificity" which in turn ensures it overwrites whatever was set on the a element earlier with a lower specificity.
Hope this helps,
Imar
|
|

October 25th, 2012, 03:56 PM
|
|
Authorized User
|
|
Join Date: Oct 2012
Posts: 19
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
Superfluous?
Imar,
I understand the specificity of .Gridview a. But since .Gridview and .Gridview a are on the same line, they are applying the same formatting. It looks to me as though .Gridview a is superfluous.
Nick1248
P.S. Any thoughts as to why $ is not understood by the browsers?
|
|

October 25th, 2012, 09:23 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
.GridView addresses whatever is inside the GridView. This determines the color of the regular text. .GridView a then addresses links specifically.
In the current setup, the text is already black. However, by explicitly stating all text in the GridView should be black, you can overwrite whatever is set as the color for the text.
$ is certainly understood by browsers. If you're referring to jQuery, I guess that the jQuery library isn;t included or referenced correcly.
Cheers,
Imar
|
|

October 26th, 2012, 05:53 PM
|
|
Authorized User
|
|
Join Date: Oct 2012
Posts: 19
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
jquery error
I finally found my error. On page 537 we are instructed to enter script src after the ContentPlaceholder. I placed the source within the ContentPlaceholder so the javascript source was not available to the browsers.
I'll have to study the .Gridview, .Gridview a construct in depth to make sure I understand it.
Last edited by nick1248; October 26th, 2012 at 05:55 PM..
|
|
 |
|