p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=554)
-   -   Help with the CH 4 Using the Wizard to Create Easy-to-Use-Forms (http://p2p.wrox.com/showthread.php?t=91690)

RogueAkula December 15th, 2013 09:15 PM

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">
<form id="form1" runat="server">

<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">
<asp:WizardStep runat="server" title="About You">
Type Your Name<asp:TextBox ID="YourName" runat="server"></asp:TextBox>
<asp:WizardStep runat="server" title="Favorite Language" StepType="Finish">
<asp:DropDownList ID="FavoriteLanguage" runat="server">
<asp:ListItem>Visual Basic</asp:ListItem>
<asp:WizardStep runat="server" StepType="Complete" Title="Ready">
<asp:Label ID="Result" runat="server" Text="Label"></asp:Label>


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

RogueAkula December 15th, 2013 09:42 PM

Sorry, posted this under the wrong book.

All times are GMT -4. The time now is 05:20 PM.

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