Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old April 13th, 2012, 05:47 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Location: Copenhagen area, Denmark
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default Can't find property EnableViewState in Try it out bulled 11, page 131

In Try it out, page 131, bulled 11, about Label control in Design view, locate the property EnableViewState.
I can't find that property in the Labels control. I have activated the control in design view and pressed F4, to find the right property.

Have I missed something in the this Try it out?

And thanks for this super book!
  #2 (permalink)  
Old April 13th, 2012, 06:55 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Can you post the code for the page? The Label control definitely has a EnableViewState property, so something else must be off....

Quote:
And thanks for this super book!
You're welcome. Good to hear you like it.

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!
  #3 (permalink)  
Old April 13th, 2012, 07:58 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Location: Copenhagen area, Denmark
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hope this is the right code I post.
It is properly something I haven't done correctly in the Try it out.
And thanks for answering my question.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="State.aspx.cs" Inherits="Demos_State" %>

<!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>
<style type="text/css">
.style1
{
width: 100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>

<table class="style1">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
<td>
<asp:Button ID="SetDate" runat="server" onclick="SetDate_Click"
Text="Set Date" />
</td>
</tr>
<tr>
<td>
<asp:Calendar ID="Calendar1" runat="server" BackColor="White"
BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest"
Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px"
Width="200px">
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<NextPrevStyle VerticalAlign="Bottom" />
<OtherMonthDayStyle ForeColor="#808080" />
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<SelectorStyle BackColor="#CCCCCC" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<WeekendDayStyle BackColor="#FFFFCC" />
</asp:Calendar>
</td>
<td>
<asp:Button ID="PlainPostBack" runat="server" onclick="PlainPostBack_Click"
Text="Plain PostBack" />
</td>
</tr>
</table>

</div>
</form>
</body>
</html>
  #4 (permalink)  
Old April 13th, 2012, 07:59 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Location: Copenhagen area, Denmark
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Forgot the code-tags...

Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="State.aspx.cs" Inherits="Demos_State" %>

<!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>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table class="style1">
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Button ID="SetDate" runat="server" onclick="SetDate_Click" 
                        Text="Set Date" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 
                        BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" 
                        Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" 
                        Width="200px">
                        <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                        <NextPrevStyle VerticalAlign="Bottom" />
                        <OtherMonthDayStyle ForeColor="#808080" />
                        <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                        <SelectorStyle BackColor="#CCCCCC" />
                        <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
                        <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                        <WeekendDayStyle BackColor="#FFFFCC" />
                    </asp:Calendar>
                </td>
                <td>
                    <asp:Button ID="PlainPostBack" runat="server" onclick="PlainPostBack_Click" 
                        Text="Plain PostBack" />
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
  #5 (permalink)  
Old April 13th, 2012, 08:09 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

That looks fine to me. I copied and pasted that code into my site and then I see the EnableViewState property show up in the Properties Grid (see attached image).

Are you sure you selected the right control in Design View and are looking at the right list / Properties Grid?

Cheers,

Imar
Attached Thumbnails
Click image for larger version

Name:	4-13-2012 2-08-12 PM.png
Views:	4
Size:	20.0 KB
ID:	96  
__________________
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:
bjork (April 14th, 2012)
  #6 (permalink)  
Old April 13th, 2012, 08:31 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Location: Copenhagen area, Denmark
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I was in the wrong property, <TD>. Should have been in Label1's property.
Thanks a lot for your help.
Have a nice weekend.
  #7 (permalink)  
Old April 13th, 2012, 03:35 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Thanks; you too, and thanks for the follow up.

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!
The Following User Says Thank You to Imar For This Useful Post:
bjork (April 14th, 2012)


Similar Threads
Thread Thread Starter Forum Replies Last Post
CHAPTER 1 PG 11, installing php 5.3.6, i can't find libmysql.dll file Iantos BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 0 May 19th, 2011 05:01 AM
GridView OnRowDataBound & Page.EnableViewState pvasudevan ASP.NET 2.0 Professional 0 November 20th, 2008 02:13 PM
stuck on page 131 crackass BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 December 1st, 2005 12:40 PM
I can't find the pageLayout property?? gmisha ASP.NET 2.0 Basics 0 September 8th, 2005 10:11 AM
For Author - p 131 uberfist BOOK: Beginning VB.NET Databases 2 June 30th, 2005 12:52 PM





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