ASP.NET
  Home arrow ASP.NET arrow Page 3 - Delving Deeper into Atlas Client Controls
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Delving Deeper into Atlas Client Controls
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2007-04-26

    Table of Contents:
  • Delving Deeper into Atlas Client Controls
  • Hyperlinks
  • Buttons
  • Selection Lists

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Delving Deeper into Atlas Client Controls - Buttons


    (Page 3 of 4 )

     

    HTML supports various kinds of buttons, e.g., <input type="submit"> to submit a form,<input type="reset">to clear a form (reset it to its original state), and<input type="button">and<button>for a button with no predefined behavior that can be enriched with JavaScript. Atlas implements buttons (<input type="button">or<button>, i.e., buttons that cannot serve any purpose without JavaScript) withSys.UI.Button. The following methods are supported:

    get_argument()
       Retrieves the argument sent along with the
       command when the button is clicked

    set_argument()
       Sets the argument of the button

    get_command()
       Retrieves the command sent when the button is
       clicked

    set_command()
       Sets the command of the button

    Checkboxes

    HTML uses <input type="checkbox"> for checkboxes. A checkbox has only two states: checked or not checked. These states can be set using JavaScript, so Atlas provides this functionality as well. The set_checked()method can change the state of a checkbox (by providing a Boolean value), andget_ checked()retrieves the current state. The associated class isSys.UI.CheckBox.

    Example 4-5 uses HTML to create a checkbox, and Atlas/JavaScript to set its checked state to true.

    Example 4-5. Using an Atlas CheckBox control

    ControlCheckBox.aspx

    <%@ Page Language="C#" %>

    <!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">
     
    <title>Atlas</title>

      <script language="JavaScript" type="text/javascript">
     
    function pageLoad() {
       
    var checkbox = new Sys.UI.CheckBox($("CheckBox1"));
       
    checkbox.set_checked(true);
     
    }
     
    </script>

    </head>
    <body>

      <form id="form1" runat="server">
        
    <atlas:ScriptManager runat="server">
       
    </atlas:ScriptManager>
        
    <div>
         
    <input type="checkbox" id="CheckBox1" />
          <label for="CheckBox1">click me!</label>
        </div>
     
    </form>
    </body>
    </html>

    Figure 4-5 shows the result displayed.

    More ASP.NET Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "Programming Atlas," published by O'Reilly....
     

    Buy this book now. This article is excerpted from chapter four of the book Programming Atlas, written by Christian Wenz (O'Reilly, 2006; ISBN: 0596526725). Check it out today at your favorite bookstore. Buy this book now.

    ASP.NET ARTICLES

    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...
    - Completing an ASP.NET AJAX Server-Centric Ba...
    - Information Management for an ASP.NET AJAX S...
    - Comment and Order Management for an ASP.NET ...
    - Back-end Management Tasks for an ASP.NET AJA...
    - User Information Management for an ASP.NET A...
    - Adding Comments and Search to an ASP.NET AJA...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway