View Single Post
  #1 (permalink)  
Old December 15th, 2013, 09:15 PM
RogueAkula RogueAkula is offline
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2013
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default Help with the CH 4 Using the Wizard to Create Easy-to-Use-Forms

I need a little help with the Try It Out for Chapter 4, specifically the Using the Wizard to Create Easy-to-Use-Forms. When I run the code in my browser (Chrome) it shows the language but not the name. I have looked at the code a hundred times now, but cant figure out what is wrong. I have posted the code and the behind code. Thanks in advance for your help.

<%@ 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">
Type Your Name<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>CSS</asp:ListItem>
<asp:ListItem>Visual Basic</asp:ListItem>
</asp:DropDownList>
</asp:WizardStep>
<asp:WizardStep runat="server" StepType="Complete" Title="Ready">
<asp:Label ID="Result" runat="server" Text="Label"></asp:Label>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</asp:Panel>

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

Partial Class Demos_Containers
Inherits System.Web.UI.Page

Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
Panel1.Visible = CheckBox1.Checked
End Sub

Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal 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
The Following User Says Thank You to RogueAkula For This Useful Post: