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>