Action



Info
   1:  <%@ Page Title="AtomicRateStars -- Read Only" Language="C#" AutoEventWireup="true" CodeBehind="ReadOnly.aspx.cs" Inherits="Atom.Website.Samples.AtomicRateStars.ReadOnly" %>
   2:   
   3:  <%@ Register Src="../Source.ascx" TagName="Source" TagPrefix="sample" %>
   4:  <%@ Register Assembly="Atom.Web" Namespace="Atom.Web.UI.WebControls" TagPrefix="atom" %>
   5:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   6:  <html xmlns="http://www.w3.org/1999/xhtml">
   7:  <head id="Header1" runat="server">
   8:      <link rel="Shortcut Icon" type="image/ico" href="../images/icon.png" />
   9:      <!-- The jQuery UI theme that will be used by the components. -->
  10:      <link href="../themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
  11:      <!-- jQuery runtime minified -->
  12:      <script src="../Scripts/jquery-1.9.1.js" type="text/javascript"></script>
  13:      <!-- jQuery UI runtime minified, client-side javascript of the components.-->
  14:      <script src="../Scripts/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
  15:      <!-- The AtomicRateStars theme extension -->
  16:      <link href="../Scripts/RateStars/jquery.rating.css" rel="stylesheet" type="text/css" />
  17:      <!-- The AtomicRateStars client-side javascript -->
  18:      <script src="../Scripts/RateStars/jquery.rating.pack.js" type="text/javascript"></script>
  19:      <!-- This style reference is needed only for the current example. -->
  20:      <link href="../css/example.css" rel="stylesheet" type="text/css" />
  21:  </head>
  22:  <body>
  23:      <form id="form1" runat="server">
  24:      <fieldset>
  25:          <legend>Action </legend>
  26:          <asp:CheckBox ID="AllowReadOnly" Text="Allow read only" runat="server" Checked="true"
  27:              AutoPostBack="true" OnCheckedChanged="AllowReadOnly_CheckedChanged" />
  28:      </fieldset>
  29:      <br />
  30:      <div>
  31:          <atom:AtomicRateStars ID="AtomicRateStars1" runat="server" ReadOnly="true">
  32:              <RateItems>
  33:                  <atom:RateItem Selected="False" Title="1" Value="1" />
  34:                  <atom:RateItem Selected="False" Title="2" Value="2" />
  35:                  <atom:RateItem Selected="False" Title="3" Value="3" />
  36:                  <atom:RateItem Selected="True" Title="4" Value="4" />
  37:                  <atom:RateItem Selected="False" Title="5" Value="5" />
  38:                  <atom:RateItem Selected="False" Title="6" Value="6" />
  39:                  <atom:RateItem Selected="False" Title="7" Value="7" />
  40:              </RateItems>
  41:          </atom:AtomicRateStars>
  42:      </div>
  43:      <br />
  44:      <sample:Source ID="Code" runat="server" />
  45:      </form>
  46:  </body>
  47:  </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:   
   8:  namespace Atom.Website.Samples.AtomicRateStars
   9:  {
  10:      public partial class ReadOnly : System.Web.UI.Page
  11:      {
  12:          protected void Page_Load(object sender, EventArgs e)
  13:          {
  14:   
  15:          }
  16:   
  17:          protected void AllowReadOnly_CheckedChanged(object sender, EventArgs e)
  18:          {
  19:              AtomicRateStars1.ReadOnly = AllowReadOnly.Checked;
  20:          }
  21:      }
  22:  }
   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:  Namespace Atom.Website.Samples.AtomicRateStars
   8:      Public Partial Class [ReadOnly]
   9:          Inherits System.Web.UI.Page
  10:          Protected Sub Page_Load(sender As Object, e As EventArgs)
  11:          End Sub
  12:          Protected Sub AllowReadOnly_CheckedChanged(sender As Object, e As EventArgs)
  13:              AtomicRateStars1.[ReadOnly] = AllowReadOnly.Checked
  14:          End Sub
  15:      End Class
  16:  End Namespace