Migrate your Web page to ASP. net ajax 1.0

Source: Internet
Author: User

If you use the Atlas Control Toolkit on the Web site, this article will help you migrate your Web page to ASP. net ajax 1.0 and translate it from the ASP. net ajax Control Toolkit website.

With the release of ASP. net ajax 1.0 Beta, there have been many fundamental changes, one of which is to remove the "TargetProperties" object from the original version.

Fortunately, migrating your Web page to the new form is very simple, just follow the steps below:

 

Step 1: Update Reference

First, the Assembly Toolkit name has changed. Update the reference of your Web site from AtlasControlToolkit to AjaxControlToolkit, and then update all the Register commands on your Web page.

<% @ Register

Assembly = "AtlasControlToolkit"

Namespace = "AtlasControlToolkit"

TagPrefix = "atlasToolkit" %>

Changed to: <% @ Register

Assembly = "AjaxControlToolkit"

Namespace = "AjaxControlToolkit"

TagPrefix = "ajaxToolkit" %>

 

 

Step 2 create an Extender instance for each property object

TargetProperties is removed from the new ASP. net ajax extension. Each attribute is now directly defined as Extender. Therefore, an Extender instance is required for each attribute object in your original code.

<AtlasToolkit: ConfirmButtonExtender

ID = "cbe1" runat = "server">

<AtlasToolkit: ConfirmButtonProperties

TargetControlID = "LinkButton1"

ConfirmText = "Delete Item? "/>

<AtlasToolkit: ConfirmButtonProperties

TargetControlID = "LinkButton2"

ConfirmText = "Update Item? "/>

</AtlasToolkit: ConfirmButtonExtender>

To:

<AjaxToolkit: ConfirmButtonExtender

ID = "cbe1" runat = "server"/>

<AjaxToolkit: ConfirmButtonExtender

ID = "cbe2" runat = "server"/>

 

Step 3 Remove the attribute declaration from Extender

Copy the property declaration 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 4 (optional) migrate ID to BehaviorID

If you reference the component ID in the property object, change its value to "BehaviorID" in 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>

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 article: http://ajax.asp.net/ajaxtoolkit/Walkthrough/AtlasToAspNetAjax.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.