Ajax Control Toolkit

Migrating your web page to the ASP.NET AJAX 1.0 Beta

The release of the ASP.NET AJAX 1.0 Beta brings with it several fundamental changes. One of these changes is the removal of the "TargetProperties" objects found in prior versions.

Fortunately, changing your web pages to use this new format is easy. Just follow the steps below.

Step 1: Update references

First, the name of the Toolkit assembly has changed. Update the reference in your website from "AtlasControlToolkit" to "AjaxControlToolkit". Then update any Register directives in your pages so that

<%@ Register
Assembly="AtlasControlToolkit"
Namespace
="AtlasControlToolkit"
TagPrefix="atlasToolkit" %>
becomes

<%@ Register
Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit"
TagPrefix="ajaxToolkit" %>


Step 2: Create an extender instance for each Properties object

The new ASP.NET AJAX 1.0 Extensions have moved away from the TargetProperties concept. For simplicity, the properties are now declared directly on the Extender. So, for each properties object in your old code, you'll need 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>

becomes

<ajaxToolkit:ConfirmButtonExtender
ID="cbe1" runat="server" />
<ajaxToolkit:ConfirmButtonExtender
ID="cbe2" runat="server"/>

Step 3: Move properties declarations to the Extender classes

Copy the properties declarations from your properties objects to the new Extender instances

<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 were referencing any of your components via an ID in the properties object, move that value to a "BehaviorID" on the Extender.

<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>

becomes

<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!