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 October 6th, 2010, 12:02 PM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 11 - Page 377 - Smart Task

Hey Imar,

First thing I would like to say is "Great book". I'm going chapter by chapter and have learned something new in each section.

My question is about step 4 in the Try It out section on page 377.

When I select to view the Smart Tag, my only option is to "Default to Master's Content".

Have I missed something? Is this a configuration item or am I clicking on the wrong item?

I get to this stage by locating the cpClientScript placeholder in Design View, right clicking, then selecting "Show Smart Tag".

Your directions state I should choose "Create Custom Content", but I do not see that option.

P.S.: In step 4, cpClientScript is misspelled as cpClientScipt
 
Old October 6th, 2010, 12:33 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,

How does the code for the Master Page look? And that of the BasicSelectors.aspx page?

Re Scipt: Yep; it's already on the errata list. http://www.wrox.com/WileyCDA/WroxTit...Cd-ERRATA.html

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 October 6th, 2010, 02:04 PM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default code

The master has the following code at the bottom before the end of the form:
<asp:ContentPlaceHolder ID="cpClientScript" runat="server">
</asp:ContentPlaceHolder>

And the BasicSelector page has this code below the first line...

<asp:Content ID="Content1" ContentPlaceHolderID="cpMainContent" Runat="Server">
<h1>Basic Selectors</h1>
<div class="SampleClass">I am a div.</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpClientScript" Runat="Server">
<script type="text/javascript">
$(function () {
$('*').css('color', 'red');
$('#Footer').css('border-bottom', '2px solid black');
$('h1').bind('click', function () { alert('Hello World') });
$('.SampleClass').addClass('PleaseWait').hide(5000 );
$('#Footer, #Header').slideUp('slow').slideDown('slow');
$('#Sidebar img').fadeTo(5000, 0.1);
});
</script>
</asp:Content>
 
Old October 6th, 2010, 02:31 PM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

It looks like the code you specified in the sample...
 
Old October 6th, 2010, 02:39 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am sure it looks like the code from the book. However, you're seeing something different, so something must indeed be different, no?

By posting the code you make it easier for me to reproduce the problem, resulting in faster answers. The alternative is that we spent 15 e-mails exchanging questions about what might be the problem.... ;-) Your call.....

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 October 6th, 2010, 03:51 PM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

*smile*

Yes. I posted the code in the response earlier, but it had yet to update on the page. While waiting I posted my observation.

Thank you for taking a look.
 
Old October 6th, 2010, 04:02 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Your page already has the ClientScript placeholder:

<asp:Content ID="Content2" ContentPlaceHolderID="cpClientScript" Runat="Server">

You only see the menu I described when you create a new page based on the template that *doesn't* yet have the PlaceHolder....

Hope this helps,

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:
rdze57 (October 6th, 2010)
 
Old October 6th, 2010, 04:04 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
s*mile*

Yes. I posted the code in the response earlier
*smiles back* Somehow I overlooked the post with the code (never made it to my e-mail). All I saw was the "it looks the same" message.

Sorry...

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 October 6th, 2010, 04:23 PM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Not a problem.

Believe it or not, I'm using your book to learn how to do ASP.Net with COBOL instead of the traditional C# or VB.Net

The fun part is translating syntax to corresponding COBOL.Net constructs.

I'm using Visual COBOL from Micro Focus (http://www.microfocus.com/visualcobol)

Last edited by rdze57; October 6th, 2010 at 04:26 PM..
 
Old October 6th, 2010, 05:22 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Interesting.... Is it working well for you so far?

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
Ch. 11 p. 377 Error when I try to Add New Diagram to my database ceboc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 November 4th, 2009 09:01 AM
Errata - Chapter 10, Page 377, C# RobC BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 October 3rd, 2006 02:26 AM
Chapter 1, page 11 typo? tumana BOOK Beginning Linux Programming, 3rd Edition 4 August 25th, 2006 10:43 AM





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