Analytics


Google

Friday, September 26, 2008

AJAX in Framework 3.5

AJAX is now built into Framework 3.5. Using it is quite straight forward:


First add
<asp:ScriptManager runat="server">
</asp:ScriptManager>
within the form tag:

The form tag is normally within the <body> </body> tags:
As in:
<head>
...
</head>
<body>
...
<form id="form1" runat="server">
....
</form>
</body>


Next use put your controls within the Update Panel. All controls within the Update Panel are automatically AJAX. However, make sure to put it within the ContentTemplate!!


<asp:UpdatePanel ID="uPane1" runat="server">
<ContentTemplate>
...
</ContentTemplate>
</asp:UpdatePanel>

No comments: