If you use the Atlas control Toolkit in your Web site, this article will help you migrate your Web pages to asp.net Ajax 1.0, translated from the ASP.net Ajax control Toolkit website.
With the release of the ASP.net AJAX 1.0 beta release, a number of fundamental changes have been introduced, one of which is the removal of the "Targetproperties" object from the original version.
Luckily, migrating your Web pages to new forms is very simple, just follow the steps below:
First step: Update references
First, the name of the Assembly toolkit has changed, updating your Web site's references from Atlascontroltoolkit to AjaxControlToolkit, and then updating all the register directives on your Web page.
<%@ Register
Assembly= "Atlascontroltoolkit"
Namespace= "Atlascontroltoolkit"
tagprefix= "Atlastoolkit"%>
Modified to:
<%@ Register
Assembly= "AjaxControlToolkit"
Namespace= "AjaxControlToolkit"
tagprefix= "Ajaxtoolkit"%>
The second step is to create a extender instance for each Property object
The new asp.net AJAX extensions remove targetproperties, each attribute is now directly defined as extender, so each attribute object in your original code requires a extender instance.
<atlastoolkit:confirmbuttonextender
Id= "CBE1" runat= "Server" >
<atlastoolkit:confirmbuttonproperties
Targetcontrolid= "LinkButton1"
confirmtext= "Delete Item?"/>
<atlastoolkit:confirmbuttonproperties
Targetcontrolid= "LinkButton2"
confirmtext= "Update Item?"/>
</atlasToolkit:ConfirmButtonExtender>
Modified to:
<ajaxtoolkit:confirmbuttonextender
Id= "CBE1" runat= "Server"/>
<ajaxtoolkit:confirmbuttonextender
Id= "Cbe2" runat= "Server"/>
Step three remove the attribute declaration from the Extender
The copy attribute is declared from the Property 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 fourth (optional) Migration ID to Behaviorid
If you refer to the ID of the component in the attribute object, the value in Extender is "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>
Modified 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>
Complete!
Original: Http://ajax.asp.net/ajaxtoolkit/Walkthrough/AtlasToAspNetAjax.aspx
Http://www.cnblogs.com/Terrylee/archive/2006/10/21/atlas_to_aspnet_ajax.html