Problems with Rough Cuts: Atlas online book, anybody?

Last post 07-23-2006 5:21 PM by Luis Abreu. 1 replies.

Sort Posts:

  • Problems with Rough Cuts: Atlas online book, anybody?

    07-23-2006, 2:20 PM
    • Member
      80 point Member
    • RBrown
    • Member since 06-25-2003, 7:55 PM
    • Posts 29

    Has anybody purchased the Rough Cuts: Atlas book from Oreily.com?  If so, I was wondering if anybody else had problems ith the DataBinding chapter...none of that code is working for me in IE 6.  Cutting and pasting the examples directly into VS 2005 and nothing is happening on those pages.

    I'm pasting a page they are using to databind (via JS code) a change in a textbox to a label.  What is wrong with this code?  Something must be missing as there are no errors, yet it does not work. 

    Any help would be greatly appreciated:

    Thanks,

    Randy

    <%@ 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 id="Head1" runat="server">
      <title>Atlas</title>
    
      <script language="JavaScript" type="text/javascript">
      function pageLoad() {
        var textbox = new Sys.UI.TextBox($("TextBox1"));
        var label = new Sys.UI.Label($("Label1"));
        
        var binding = new Sys.BindingBase();
        binding.set_dataContext(textbox); 
        binding.set_dataPath("text");
        binding.set_property("text");
        binding.transform.add(Sys.BindingBase.Transformers.ToString);
        binding.set_transformerArgument("Text entered: {0}");
        label.get_bindings().add(binding);
    
        textbox.initialize();
        label.initialize();
      }
      </script>
    
    </head>
    <body>
      <form id="form1" runat="server">
        <atlas:ScriptManager ID="ScriptManager1" runat="server">
        </atlas:ScriptManager>
        <div>
          <input type="text" id="TextBox1" /><br />
          <label id="Label1"></label>
        </div>
      </form>
    </body>
    </html>
     
  • Re: Problems with Rough Cuts: Atlas online book, anybody?

    07-23-2006, 5:21 PM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 1:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello.

    you should use the Sys.Binding class instead of the Sys.BindingBase class.

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
Page 1 of 1 (2 items)