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, 08:39 PM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

so far so good.

I think it would be interesting to do a supplement showing what the corresponding COBOL.Net solution looks like.
 
Old October 7th, 2010, 02:34 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, I agree. If you can create a working example of the Planet Wrox sample site in COBOL, I am sure we can find a place for it on the Wrox web site or my own web site for others to download. I am just a little worried about the database stuff. I don't think you'll be able to use the Entity Framework with COBOL, unless you spend a considerable amount of time programming. Then again, maybe Code First (not discussed in the book) with EF would work, or maybe there are third party solutions.

Out of curiosity: why are you doing this in COBOL?

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 7th, 2010, 09:21 AM
Registered User
 
Join Date: Oct 2010
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I'll see what I can do. I was working to create my own samples, etc. and hadn't been using the Planet Wrox sample exactly. I have been focused more on the function/features that you have highlighted.

As for the why, Visual COBOL is the product I use. I work for Micro Focus...
 
Old October 7th, 2010, 10:18 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Don't spend too much time on it then.... I thought that by "it would be interesting to do a supplement showing what the corresponding COBOL.Net solution looks like" you were more or less offering a Planet Wrox in COBOL. I don't think there's a lot of demand for a COBOL vesion of PW, so it may not be worth your time...

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 29th, 2012, 01:44 PM
Authorized User
 
Join Date: May 2012
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Same problem, unable to resolve

Hello, I am having the same problem as rdze57 described - When I select to view the Smart Tag, my only option is to "Default to Master's Content".
My Frontend master code:
Code:
            <div id="Footer">Footer Goes Here</div>
        </div>
        <asp:ContentPlaceHolder ID="cpClientScript" runat="server">
        </asp:ContentPlaceHolder>
    </form>
</body>
and my BasicSelectors code:
Code:
<%@ Page Title="Basic Selectors" Language="VB" MasterPageFile="~/MasterPages/Frontend.master" AutoEventWireup="false" CodeFile="BasicSelectors.aspx.vb" Inherits="Demos_BasicSelectors" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpClientScript" Runat="Server">
</asp:Content>
What am i doing incorrectly?

thanks.
 
Old May 30th, 2012, 04:52 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,

The answer would be the same as the one for rdze57. You only see that option for pages that don't have this content place holder present in the code. Yours does, and thus that option is not there (it's added by choosing that option when it isn't there yet).

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!
 
Old June 8th, 2012, 09:01 PM
Registered User
 
Join Date: Jun 2012
Posts: 8
Thanks: 2
Thanked 1 Time in 1 Post
Default Having troubles with step 4 and 5 on p.377

Hello Imar,

I'm having troubles with step 4 and 5 on p.377.

First problem, you say in step 4 to "Locate the cpClientScript" placeholder at the bottom." It doesn't exist. I think for it to be there, I have to go into the zip file of my template and add the cpClientScript placeholder, but maybe I'm missing something.

Second problem, Ok so I just manually add the cpClientScript placeholder to my newly created aspx file BasicSelectors.aspx and go to Design View and I cannot see the placeholder. So I cannot complete step 4 to open the Smart Task panel and choose Create Custom Content.

Help!!! :)

BasicSelectors.aspx (with the cpClientScript added manually)
Code:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Frontend.master" AutoEventWireup="true" CodeFile="BasicSelectors.aspx.cs" Inherits="Demos_BasicSelectors" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpClientScript" Runat="Server">
</asp:Content>
Master Page
Code:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Frontend.master.cs" Inherits="MasterPages_Frontend" %>

<!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 runat="server">
    <title></title>
   <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder> 
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/jquery-1.4.1.min.js" />
        </Scripts>
    </asp:ScriptManager>
    <div id="PageWrapper">
        <div id="Header">
            <a href="~/" runat="server"></a>
        </div>
        <div id="MenuWrapper">
            <asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" DataSourceID="SiteMapDataSource1"
                Orientation="Horizontal" StaticEnableDefaultPopOutImage="False">
            </asp:Menu>
            <asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" ShowExpandCollapse="False">
                <LevelStyles>
                    <asp:TreeNodeStyle CssClass="FirstLevelMenuItems" />
                </LevelStyles>
            </asp:TreeView>
            <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
        </div>
        <div id="MainContent">
            <asp:SiteMapPath ID="SiteMapPath1" runat="server">
            </asp:SiteMapPath>
            <br />
            <br />
            <asp:ContentPlaceHolder ID="cpMainContent" runat="server">
            </asp:ContentPlaceHolder>
        </div>
        <div id="Sidebar">
            Select a Theme
            <br />
            <asp:DropDownList ID="ThemeList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ThemeList_SelectedIndexChanged">
                <asp:ListItem>Monochrome</asp:ListItem>
                <asp:ListItem>DarkGrey</asp:ListItem>
            </asp:DropDownList>
            <br />
            <br />
            <br />
            <Wrox:Banner ID="Banner1" runat="server" DisplayDirection="Vertical" />
        </div>
        <div id="Footer">
            Footer Goes Here
        </div>
    </div>
    <asp:ContentPlaceHolder ID="cpClientScript" runat="server">
    </asp:ContentPlaceHolder>
    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
    </asp:ContentPlaceHolder>
    </form>
</body>
</html>
 
Old June 8th, 2012, 09:06 PM
Registered User
 
Join Date: Jun 2012
Posts: 8
Thanks: 2
Thanked 1 Time in 1 Post
Default I had an extra placeholder

As you can see in my Master Page I had added another Content Placeholder because I was trying different things out.

Now I have removed the additional placeholder and just have the cpClientScript placeholder.

I now see it in Design View in the footer section, but cannot access the Smart Task panel.
 
Old June 8th, 2012, 09:13 PM
Registered User
 
Join Date: Jun 2012
Posts: 8
Thanks: 2
Thanked 1 Time in 1 Post
Default Oh my word...I'm such an idiot

I should just follow the directions....user error! :)

So, for step 4 instead of going to design view like you told me...I was looking in markup view and noticed there was no cpClientScript placeholder. I thought I had done something wrong...so I added it manually. Now when I added it and went to Design View the Smart Task panel isn't there, I guess because I had already completed the Smart Task. Which wasn't very Smart. :)

Now I see that's what you were telling a previous poster.

Now when I remove it, I can see the Smart Task and it looks like all it does is add the stuff that I typed manually...it's a short cut. Ah ok. I get it now.

Cinco
 
Old June 9th, 2012, 04:56 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 Cinco,

Quote:
it's a short cut
Yes, in Design View, the "Create Custom Content" command just adds the Content control for you based on the ContentPlaceHolder in the Master Page.

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