programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Sunday, August 3, 2014

Use radiobuttonlist with VB

Radiobuttonlist with VB 

The RadioButton control is used to give a set of similar  options.  User can choose one radio button in a  particular group. If you want to place more than one group  in the same form, Then you can use  different container controls like a GroupBox1,GroupBox2...etc control.

Example of  button list with VB language:

Radiobuttonlist  in vb
Radiobuttonlist  in vb

<%@ Page Language="VB" AutoEventWireup="True" %>
   <script language="VB" runat="server">
      Sub Button1_Click(Source As Object, e As EventArgs)
         If RadioButtonList1.SelectedIndex > - 1 Then
            Label1.Text = "You selected: " & _
         End If
      End Sub

      Sub chkLayout_CheckedChanged(sender As Object, e As EventArgs)       
         If chkLayout.Checked = True Then
            RadioButtonList1.RepeatLayout = RepeatLayout.Table
            RadioButtonList1.RepeatLayout = RepeatLayout.Flow
         End If
      End Sub

      Sub chkDirection_CheckedChanged(sender As Object, e As EventArgs)       
         If chkDirection.Checked = True Then
            RadioButtonList1.RepeatDirection = RepeatDirection.Horizontal
            RadioButtonList1.RepeatDirection = RepeatDirection.Vertical
         End If
      End Sub
   <form runat="server">
      <h3>RadioButtonList Example</h3>
      <asp:RadioButtonList id=RadioButtonList1 runat="server">
         <asp:ListItem>Item 1</asp:ListItem>
         <asp:ListItem>Item 2</asp:ListItem>
         <asp:ListItem>Item 3</asp:ListItem>
         <asp:ListItem>Item 4</asp:ListItem>
         <asp:ListItem>Item 5</asp:ListItem>
         <asp:ListItem>Item 6</asp:ListItem>
      <asp:CheckBox id="chkLayout"
           Text="Display Table Layout"
           Checked=true AutoPostBack="true"
           runat="server" />
      <asp:CheckBox id="chkDirection"
           Text="Display Horizontally"
           runat="server" />
      <asp:Button id="Button1"
      <asp:Label id="Label1"

No comments:

Post a Comment