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

October 6th, 2010, 12:33 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

October 6th, 2010, 02:31 PM
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
It looks like the code you specified in the sample...
|
|

October 6th, 2010, 02:39 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

October 6th, 2010, 04:02 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

October 6th, 2010, 04:04 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

October 6th, 2010, 05:22 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Interesting.... Is it working well for you so far?
Imar
|
|
 |
|