Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 25th, 2011, 04:24 PM
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: Oct 2007
Location: , , .
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default Chap. 4, Pg 121-123

Cannot get past this error at Try It Out beginning pg. 121. Apparently 'errs' on "Result.Text" statement (VB). What's my problem

Installed MS Visual Web Dev 2010 Express, MS Visual Basic 2010 Express, MS Visual Basic 2010 Express on 64bit Windows 7. All products are current with updates.

This message in error window:
"C:\BegASPNET\Site\Demos\Containers.aspx.vb(10 ,0): error BC30456: 'Text' is not a member of 'System.Web.UI.WebControls.WizardStep'."

Thanks
Reply With Quote
  #2 (permalink)  
Old August 25th, 2011, 07:06 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Hi there,

Can you post the full code for the problematic 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!
Reply With Quote
  #3 (permalink)  
Old August 26th, 2011, 12:56 PM
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: Oct 2007
Location: , , .
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Imar,

Here's the code - C:/BegASPNET/Site/Demos/Containers.aspx

<
asp:WizardID="Wizard1"runat="server"ActiveStepIndex="0"Width="500px">
<WizardSteps>
<asp:WizardSteprunat="server"title="About You">
<asp:LabelID="Label1"runat="server"Text="Type your name"></asp:Label>
<asp:TextBoxID="YourName"runat="server"></asp:TextBox>
</asp:WizardStep>
<asp:WizardSteprunat="server"title="Favorite Language"StepType="Finish">
<asp:DropDownListID="FavoriteLanguage"runat="server">
<asp:ListItem>C#</asp:ListItem>
<asp:ListItem>Visual Basic</asp:ListItem>
<asp:ListItem>CSS</asp:ListItem>
</asp:DropDownList>
</asp:WizardStep>
<asp:WizardSteprunat="server"StepType="Complete"Title="Result"ID="Result"Label="Result">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

And, here's the code - C:/BegASPNET/Site/Demos/Containers.aspx.vb

PartialClassDemos_Containers
Inherits System.Web.UI.Page
ProtectedSub CheckBox1_CheckedChanged(sender AsObject, e As System.EventArgs) Handles CheckBox1.CheckedChanged
Panel1.Visible = CheckBox1.Checked
EndSub
ProtectedSub Wizard1_FinishButtonClick(sender AsObject, e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick
Result.Text =
"Your name is " & YourName.Text
Result.Text &=
"<br />Your favorite language is " & FavoriteLanguage.SelectedValue
EndSub
End
Class

Here's the error from Error List:

Error 1 'Text' is not a member of 'System.Web.UI.WebControls.WizardStep'. C:\BegASPNET\Site\Demos\Containers.aspx.vb 10 5 C:\BegASPNET\Site\

Error 2 'Text' is not a member of 'System.Web.UI.WebControls.WizardStep'. C:\BegASPNET\Site\Demos\Containers.aspx.vb 11 5 C:\BegASPNET\Site\


Have entered per instructions several times, including copying from the download. Same results each time.

Love your format and instructions.

Any help is appreciated.

Tom Potter
Reply With Quote
  #4 (permalink)  
Old August 26th, 2011, 01:12 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Hi Tom.

Did you copy and paste both the markup and the code behind from the source files? These files are correct, so maybe something else is going on.

Can you also please repost your code but then paste it into Notepad first to remove color coding, and then wrap the code in Code tags using the Code button (#) in the post's editor? Because of some stupid bug in this forum, colored code ends up really messed up... If you do repost, please post the full markup of the page and the code behind, and not just the Wizard control.

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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
tompp (August 26th, 2011)
  #5 (permalink)  
Old August 26th, 2011, 01:32 PM
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: Oct 2007
Location: , , .
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Imar, here's complete code via Notepad.

Complete - Containers.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Containers.aspx.vb" Inherits="Demos_Containers" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<div>

<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True"
Text="Show Panel" />
<asp:Panel ID="Panel1" runat="server" Visible="False">
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Width="500px">
<WizardSteps>
<asp:WizardStep runat="server" title="About You">
<asp:Label ID="Label1" runat="server" Text="Type your name"></asp:Label>
<asp:TextBox ID="YourName" runat="server"></asp:TextBox>
</asp:WizardStep>
<asp:WizardStep runat="server" title="Favorite Language" StepType="Finish">
<asp:DropDownList ID="FavoriteLanguage" runat="server">
<asp:ListItem>C#</asp:ListItem>
<asp:ListItem>Visual Basic</asp:ListItem>
<asp:ListItem>CSS</asp:ListItem>
</asp:DropDownList>
</asp:WizardStep>

<asp:WizardStep runat="server" StepType="Complete" Title="Result" ID="Result" Label="Result">
</asp:WizardStep>

</WizardSteps>
</asp:Wizard>
</asp:Panel>

</div>
</form>
</body>
</html>

Complete - Containers.aspx.vb

Partial Class Demos_Containers
Inherits System.Web.UI.Page
Protected Sub CheckBox1_CheckedChanged(sender As Object, e As System.EventArgs) Handles CheckBox1.CheckedChanged
Panel1.Visible = CheckBox1.Checked
End Sub
Protected Sub Wizard1_FinishButtonClick(sender As Object, e As System.Web.UI.WebControls.WizardNavigationEventArg s) Handles Wizard1.FinishButtonClick
Result.Text = "Your name is " & YourName.Text
Result.Text &= "<br />Your favorite language is " & FavoriteLanguage.SelectedValue
End Sub
End Class

Complete - Error List

Error 1 'Text' is not a member of 'System.Web.UI.WebControls.WizardStep'. C:\BegASPNET\Site\Demos\Containers.aspx.vb 10 5 C:\BegASPNET\Site\

Error 2 'Text' is not a member of 'System.Web.UI.WebControls.WizardStep'. C:\BegASPNET\Site\Demos\Containers.aspx.vb 11 5 C:\BegASPNET\Site\

Message 3 Validation (ASP.Net): Attribute 'Label' is not a valid attribute of element 'WizardStep'. C:\BegASPNET\Site\Demos\Containers.aspx 30 91 C:\BegASPNET\Site\


Had same "Text is not a member .............. message on pg.129 Try It Out.

Clicked appreciation icon.

Tom Potter
Reply With Quote
  #6 (permalink)  
Old August 26th, 2011, 02:17 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Ah, there we have it. Take a look at this:

Code:
 
<asp:WizardStep runat="server" StepType="Complete" Title="Result" ID="Result" Label="Result">
</asp:WizardStep>
Somehow, you merged the last Wizard step and the Result label. The code should look like this instead:

Code:
<asp:WizardStep runat="server" StepType="Complete" Title="Ready">
  <asp:Label ID="Result" runat="server" Text="Label"></asp:Label>
</asp:WizardStep>
Notice how the Label is placed inside the WizardStep definition...

If you post code in the future, please wrap it in code tags using the # button; makes the code easier to read as it preserves formatting among other things.

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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
tompp (August 26th, 2011)
  #7 (permalink)  
Old August 26th, 2011, 02:33 PM
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: Oct 2007
Location: , , .
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Imar,
Got. My bad. Thanks for the prompt assist.

Tom Potter
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch. 4 -- Split-View Based App, pg. 121 sirab33 BOOK: Beginning iOS 4 Application Development 2 May 25th, 2011 07:37 PM
Try it Now, Chap. 4, Pg 123 jefals BOOK: Beginning ASP.NET 4 : in C# and VB 8 May 9th, 2011 12:41 PM
BasePage (Chap 4 pg 98) NetWorld BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 1 November 25th, 2010 02:39 PM
Chap 15 pg 532 tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 10 April 2nd, 2010 04:37 PM
return *this - Chap 8 pg 418 proslambano BOOK: Ivor Horton's Beginning Visual C++ 2005 0 March 10th, 2007 01:19 PM



All times are GMT -4. The time now is 12:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.