Action


Info
   1:  <%@ Page Language="C#" Title="AtomicButtonSet -- Type" AutoEventWireup="true" CodeBehind="ButtonSetType.aspx.cs"
   2:      Inherits="Atom.Website.Samples.AtomicButtonSet.RadioSetType" %>
   3:   
   4:  <%@ Register Src="../Source.ascx" TagName="Source" TagPrefix="sample" %>
   5:  <%@ Register Assembly="Atom.Web" Namespace="Atom.Web.UI.WebControls" TagPrefix="atom" %>
   6:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   7:  <html xmlns="http://www.w3.org/1999/xhtml">
   8:  <head id="Header1" runat="server">
   9:      <link rel="Shortcut Icon" type="image/ico" href="../images/icon.png" /> 
  10:      <!-- The jQuery UI theme that will be used by the components. -->
  11:      <link href="../themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
  12:      <!-- jQuery runtime minified -->
  13:      <script src="../Scripts/jquery-1.9.1.js" type="text/javascript"></script>
  14:      <!-- jQuery UI runtime minified, client-side javascript of the components.-->
  15:      <script src="../Scripts/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
  16:      <!-- This style reference is needed only for the current example. -->
  17:      <link href="../css/example.css" rel="stylesheet" type="text/css" />
  18:  </head>
  19:  <body>
  20:      <form id="form1" runat="server">
  21:      <fieldset>
  22:          <legend>Action </legend>
  23:          <label for="ButtonSetOrinetation">
  24:              ButtonSet type
  25:          </label>
  26:          <asp:DropDownList runat="server" ID="ButtonSetType" AutoPostBack="true" 
  27:              onselectedindexchanged="ButtonSetType_SelectedIndexChanged">
  28:              <asp:ListItem Text="Radios" Value="Radios" Selected="True" />
  29:              <asp:ListItem Text="Checkboxes" Value="Checkboxes" />
  30:          </asp:DropDownList>
  31:      </fieldset>
  32:      <br />
  33:      <div>
  34:          <atom:AtomicButtonSet ID="AtomicButtonSet1" runat="server" Type="Radios">
  35:              <Buttons>
  36:                  <atom:ButtonSetItem Text="ButtonSetItem 1" />
  37:                  <atom:ButtonSetItem Text="ButtonSetItem 2" />
  38:                  <atom:ButtonSetItem Text="ButtonSetItem 3" />
  39:                  <atom:ButtonSetItem Text="ButtonSetItem 4" />
  40:              </Buttons>
  41:          </atom:AtomicButtonSet>
  42:      </div>
  43:      <sample:Source ID="Code" runat="server" />
  44:      </form>
  45:  </body>
  46:  </html>
   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Web.UI;
   6:  using System.Web.UI.WebControls;
   7:  using Atom.Web.UI.WebControls.ButtonSet;
   8:   
   9:  namespace Atom.Website.Samples.AtomicButtonSet
  10:  {
  11:      public partial class RadioSetType : System.Web.UI.Page
  12:      {
  13:          protected void Page_Load(object sender, EventArgs e)
  14:          {
  15:   
  16:          }
  17:   
  18:          protected void ButtonSetType_SelectedIndexChanged(object sender, EventArgs e)
  19:          {
  20:              AtomicButtonSet1.Type = (ButtonSetType)Enum.Parse(typeof(ButtonSetType), ButtonSetType.SelectedValue.ToString(), true);
  21:          }
  22:      }
  23:  }
   1:  Imports System
   2:  Imports System.Collections.Generic
   3:  Imports System.Linq
   4:  Imports System.Web
   5:  Imports System.Web.UI
   6:  Imports System.Web.UI.WebControls
   7:  Imports Atom.Web.UI.WebControls.ButtonSet
   8:  Namespace Atom.Website.Samples.AtomicButtonSet
   9:      Public Partial Class RadioSetType
  10:          Inherits System.Web.UI.Page
  11:          Protected Sub Page_Load(sender As Object, e As EventArgs)
  12:          End Sub
  13:          Protected Sub ButtonSetType_SelectedIndexChanged(sender As Object, e As EventArgs)
  14:              AtomicButtonSet1.Type = DirectCast([Enum].Parse(GetType(ButtonSetType), ButtonSetType.SelectedValue.ToString(), True), ButtonSetType)
  15:          End Sub
  16:      End Class
  17:  End Namespace