Monday, July 11, 2011

Monday 7/11/2011


<div>
<p>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>C#</asp:ListItem>
<asp:ListItem>Visual Basic</asp:ListItem>
<asp:ListItem>CSS</asp:ListItem>
</asp:DropDownList>
</p>
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
<asp:ListItem>C#</asp:ListItem>
<asp:ListItem>Visual Basic</asp:ListItem>
<asp:ListItem>CSS</asp:ListItem>
</asp:CheckBoxList>
<p>

<asp:Button ID="Button1" runat="server" Text="Button" />
</p>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
</div>

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = "In the DDL you selected " & DropDownList1.SelectedValue & "
"

For Each item As ListItem In CheckBoxList1.Items
If item.Selected Then
Label1.Text &= "In the CBL you selected " & item.Value & "
"
End If
Next
End Sub






<div>
<asp:Panel ID="Panel1" runat="server">
<asp:Wizard ID="Wizard1" runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="About You">
<asp:Label ID="Label1" runat="server" Text="Type Your Name"></asp:Label>
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" title="Favorite Language">
<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" Title="Ready">
<asp:Label ID="lblResult" runat="server" Text="Label"></asp:Label>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</asp:Panel>

No comments: