If you use the Atlas Control Toolkit in your Web site, then this article helps migrate your Web pages to ASP.NET AJAX 1.0, translated from the ASP.NET AJAX Control Toolkit website.
With the release of ASP.NET AJAX 1.0 Beta, many fundamental changes have been brought, one of which is the removal of the "TargetProperties" object from the original version.
Fortunately, migrating your web pages to the new format is very simple, just follow these steps:
Step 1: Update the reference
. First, the name of the assembly Toolkit has changed. Update the reference of your Web site from AtlasControlToolkit to AjaxControlToolkit, and then update all the Register instructions in your Web page.
<%@ Register
Assembly="AtlasControlToolkit"
Namespace="AtlasControlToolkit"
TagPrefix="atlasToolkit" %>
Modify to:
<%@ Register
Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit"
TagPrefix="ajaxToolkit" %>
The second step is to create an Extender instance for each property object.
TargetProperties has been removed from the new ASP.NET AJAX extension. Each property is now directly defined as an Extender, so in your original code, each property object needs an Extender instance. .
<atlasToolkit:ConfirmButtonExtender
ID="cbe1" runat="server">
<atlasToolkit:ConfirmButtonProperties
TargetControlID="LinkButton1"
ConfirmText="Delete Item?" />
<atlasToolkit:ConfirmButtonProperties
TargetControlID="LinkButton2"
ConfirmText="Update Item?" / >
</atlasToolkit:ConfirmButtonExtender>
Modify to:
<ajaxToolkit:ConfirmButtonExtender
ID="cbe1" runat="server" />
<ajaxToolkit:ConfirmButtonExtender
ID="cbe2" runat="server"/>
The third step is to remove the property declaration from the Extender
and copy the property declaration from the properties object to the new Extender instance.
<ajaxToolkit:ConfirmButtonExtender
ID="cbe12
"runat="server"
TargetControlID="LinkButton1"
ConfirmText="Delete Item?" />
<ajaxToolkit:ConfirmButtonExtender
ID="cbe2"
runat="server"
TargetControlID="LinkButton2"
ConfirmText=" UpdateItem?" />
Step 4 (optional) Migrate ID to BehaviorID
If you reference the component's ID in the attribute object, modify its value in the Extender to "BehaviorID".
<atlasToolkit:ConfirmButtonExtender
ID="cbe1" runat="server">
<atlasToolkit:ConfirmButtonProperties
ID="confirmBehavior1"
TargetControlID="LinkButton1"
ConfirmText="Delete?" />
</atlasToolkit:ConfirmButtonExtender>
<script type="text/javascript">
function doSomething() {
var b = $object("confirmBehavior1");
b.confirm();
}
</script>
Modify to:
<ajaxToolkit:ConfirmButtonExtender
ID="cbe1"
BehaviorID="confirmBehavior1"
runat="server"
TargetControlID="LinkButton"
ConfirmText="Delete?" />
<script type="text/javascript">
function doSomething() {
var b = $find("confirmBehavior1");
b.confirm();
}
</script>
Done!
Original text: http://ajax.asp.net/ajaxtoolkit/Walkthrough/AtlasToAspNetAjax.aspx
http://www.cnblogs.com/Terrylee/archive/2006/10/21/atlas_to_aspnet_ajax.html