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

August 26th, 2013, 08:09 PM
|
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
Innerworkings complaint!
I am currently going through the innerworkings for this book and I am encountering a problem on the introducing master pages section of the challenges. The instructions say:
Open the Default.aspx file in Source view. Select all the markup code (except the @Page directive), then cut and paste it to the SiteMaster.master file.
The problem is that it doesn't say where to put the markup code from the Default.aspx in the sitemaster.master master page file. This is very confusing and It really makes no sense whatsoever. Can I get a point of clarification on any of this please?
|
|

August 26th, 2013, 08:15 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I haven't seen the actual training material, but the logical thing to do seems to replace the entire master page content, except for the @Master directive. Only guessing though. If this is indeed what you should do, I think it would be be followed by other steps where you add content placeholders.
Cheers,
Imar
|
|

August 26th, 2013, 08:48 PM
|
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
I tried following the instructions to the letter...
And they make no sense whatsoever. None of it works. This is just crazy. I can't make heads or tails out of it whatsoever. Very confusing, very confusing indeed.
I don't know what to do at this point. I feel like sending it all back and see if I can get a refund from Wrox.
|
|

August 26th, 2013, 08:51 PM
|
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
Quote:
Originally Posted by Imar
I haven't seen the actual training material, but the logical thing to do seems to replace the entire master page content, except for the @Master directive. Only guessing though. If this is indeed what you should do, I think it would be be followed by other steps where you add content placeholders.
Cheers,
Imar
|
See if you can create the following master page off of the following markup code:
Code:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="SiteMaster.master.cs" Inherits="SiteMaster" %>
<%--
Todo:
The web site contains a SiteMaster.master master page, in the application's root
folder, that uses the same layout template as the existing Default.aspx page. The
Master Page should contain all markup code from Default.aspx page.
--%>
<%--
Todo:
The Default.aspx content page contains a Content control called DefaultPageContent
that uses the content placeholder section in the master page. The Content control is
associated with the DetailsPlaceHolder content placeholder control from
SiteMaster.master master page.
--%>
<%--
Todo:
The web site contains a content page called Company.aspx that is associated with the
SiteMaster.master master page.
--%>
<%--
Todo:
The Company.aspx content page contains a Content control called CompanyPageContent
that uses the content placeholder section in the master page. The Content control is
associated with the DetailsPlaceHolder content placeholder control from
SiteMaster.master master page. Set the content of this Content control to "About Us
page content".
--%>
<%@ Register Src="UserControls/Header.ascx" TagName="Header" TagPrefix="IW" %>
<%@ Register Src="UserControls/Footer.ascx" TagName="Footer" TagPrefix="IW" %>
<%@ Register Src="UserControls/Navigation.ascx" TagName="Navigation" TagPrefix="IW" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<link href="Styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="Form2" runat="server">
<div class="page">
<div class="header">
<IW:Header ID="HeaderControl" runat="server" />
<IW:Navigation ID="NavigationControl" runat="server" />
</div>
<div class="main">
<%--
Todo:
The master page in the 'main' div defines a ContentPlaceHolder control
called DetailsPlaceHolder, that displays the content from a page
associated with the master.
--%>
<asp:PlaceHolder ID="DetailsPlaceHolder" runat="server">
</asp:PlaceHolder>
</div>
<div class="clear">
</div>
<IW:Footer ID="FooterControl" runat="server" />
</div>
</form>
</body>
</html>
Then after you do that do this:
In the Solution Explorer window, right-click the name of the web site and select Add - Add New Item…. Under Visual Studio installed templates, click Web Form. In the Name box, type 'Company.aspx'. Click the Select a Master Page check box and then click Add. In the Select Master Page window, choose SiteMaster.master and click OK. Open the Company.aspx file in Source view. Change the ID of the Content control to 'CompanyPageContent'. Put the text "About Us page content" in the content of <asp:Content> tag.
Code:
<%@ Page Language="C#"
MasterPageFile="~/SiteMaster.master"
AutoEventWireup="true"
CodeFile="Company.aspx.cs"
Inherits="Company"
Title="Super Games Inc. Company Page" %>
<asp:Content ID="CompanyPageContent" ContentPlaceHolderID="DetailsPlaceHolder" Runat="Server">
About Us page content
</asp:Content>
Maybe you can tell what steps I am missing.
Last edited by vbboyd; August 26th, 2013 at 09:04 PM..
Reason: I didn't put the right instructions.
|
|

August 26th, 2013, 09:22 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
Maybe you can tell what steps I am missing.
|
Nope, I can't as I don't have the material so I don't know what they ask you to do.
I'll ask Wrox what to do with support questions about the Innerworkings material.
Cheers,
Imar
|
|

August 27th, 2013, 10:18 AM
|
 |
Wrox Staff
Points: 18,059, Level: 58 |
|
|
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
|
|
vbboyd: If you get stuck on a task, you can access hints in the InnerWorkings interface. When you have your code judged, if you make a few attempts with no progress, you get an option to go to the steps and expand to the see the step by step items to do.
You can also use the "go to steps" option and any point before you write any code or judge it.
And if all else fails, there's a "personal tutor" option to have someone jump in and look at what you're stuck on.
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click  on their post!
|
|

August 27th, 2013, 10:39 AM
|
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
So far
I have gone to the go to steps option and that is what is confusing me. The go to steps option instructions are very confusing to me and they make no sense whatsoever. I don't know what to do next.
|
|

August 27th, 2013, 11:28 AM
|
 |
Wrox Staff
Points: 18,059, Level: 58 |
|
|
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
|
|
Couple of things. Yes, in the context of getting stuck this bad, I think the right thing to do is to use the personal tutor feature. I think it's set up better for monitored "ticket" style support than the informal forum support here (even as good as Imar is informally on his books!).
On this one though, there's more direction at the beginning of that step in "view step" that I think it makes it clearer: In the Solution Explorer window of Visual Studio, right-click the name of the web site and select Add - Add New Item... from the context menu. In the Visual Studio installed templates section of the Add New items dialog box, select the Master Page icon. In the Name text box, type 'SiteMaster.master' and click Add.
Open the Default.aspx file in Source view. Select all the markup code (except the @Page directive), then cut and paste it to the SiteMaster.master file. When you look at in in the context that step one is create a new blank master page, then yes, it makes total sense that you're replacing all of the default markup there.
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click  on their post!
|
|

September 5th, 2013, 10:55 AM
|
|
|
InnerWorkings: Personal Tutor Support
Hi,
I'm part of the InnerWorkings team so firstly, my apologies for being so late in addressing your issues. Normally our support and guidance issues are dealt with through the InnerWorkings Platform and we haven't been monitoring the P2P forum for such issues. We will now!
I have asked our Personal Support service to try to contact you and help you with the issue. I hope they'll be in touch with you soon and will quickly resolve the issue to your satisfaction.
In the meantime I hope that you can continue with and enjoy the remaining code challenges.
Best Regards
Bob
|
|

September 12th, 2013, 11:12 AM
|
|
Registered User
|
|
Join Date: Sep 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: MasterPage project steps.
Hi vbboyd,
I am a personal tutor with InnerWorkings and I think that I can help to clarify the steps for you a little bit.
To start with, after creating the SiteMaster.master file in the project, you will need to remove all of the markup from that file except for the very top line of code which is the @Master directive for the master page file.
After that you will go to the source view of the Default.aspx page and CUT all of the markup from the source view so that only the @Page directive line of code at the top of the page is left in place.
Then you will paste the cut markup from the Default.aspx page into the SiteMaster.master source view after the @Master directive line of code.
The markup within the SiteMaster.master file should now look like the following.
Code:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="SiteMaster.master.cs" Inherits="SiteMaster" %>
<%@ Register Src="UserControls/Header.ascx" TagName="Header" TagPrefix="IW" %>
<%@ Register Src="UserControls/Footer.ascx" TagName="Footer" TagPrefix="IW" %>
<%@ Register Src="UserControls/Navigation.ascx" TagName="Navigation" TagPrefix="IW" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head">
<link rel="stylesheet" type="text/css" href="Styles.css" />
<title>Super Games Inc. Home page</title>
</head>
<body>
<form id="MainForm" runat="server">
<div>
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="2" align="center">
<IW:Header ID="HeaderControl" runat="server" />
</td>
</tr>
<tr>
<td valign="top">
<IW:Navigation ID="NavigationControl" runat="server" />
</td>
<td valign="top">
Home page content
</td>
</tr>
<tr>
<td colspan="2" align="center">
<IW:Footer ID="FooterControl" runat="server" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
That should help with the steps that you were having trouble with. If you are still having issues or need additional assistance you can always contact us directly using the Personal Tutor functionality within the Developer Interface application or through the Visual Studio add-in. This will enable us to review your project files directly and then we can offer suggestions to get you moving forward.
Hopefully that helps a bit. If you have any more questions or need additional clarification just let us know.
Cheers!
Jim
InnerWorkings Personal Tutor
|
|
 |
|