Migrating to ASP.NET AJAX Beta 1
If you're trying to migrate from previous Microsoft Atlas releases to the new ASP.NET AJAX Core Beta 1 you'll quickly find out that several things have changed. I was playing around with the AutoCompleteExtender this evening and noticed that it isn't in the "core" installation but has been moved into the CTP installation. It's been changed a bit too. In previous releases you would define it using syntax similar to the following:
<atlas:AutoCompleteExtender ID="aceTxtCountry" runat="server">
<atlas:AutoCompleteProperties Enabled="True"
ServiceMethod="GetCountries"
ServicePath="~/CustomerService.asmx"
TargetControlID="txtCountry" MinimumPrefixLength="1" />
</atlas:AutoCompleteExtender>
The AutoCompleteProperties property of the AutoCompleteExtender control has been removed and everything is defined directly on the AutoCompleteExtender tag itself using attributes now:
<asp:AutoCompleteExtender ID="aceTxtCountry" runat="server"
ServiceMethod="GetCountries"
ServicePath="~/CustomerService.asmx"
TargetControlID="txtCountry"
MinimumPrefixLength="1" />
There are some other subtle changes that can bite you too on this control.
If you're calling Web Services from ASP.NET AJAX enabled pages you'll also have to make a change to the service. Web Service classes now have to be defined using the ScriptService attribute as shown next:
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class WebService : System.Web.Services.WebService {
//Web Service Code
}
I'm hoping this change won't make it into the final release (although admit I'm still a bit vague on the rationale so I could change my mind) because in enterprise scenarios you may not have control over a Web Service and be able to add the attribute. That means you'd have to make a wrapper Web Service that defines the ScriptService attribute and calls the "real" Web Service to get the data or write another custom solution. We'll see what happens though...
Subscribe to my Free FlipBoard Magazines: | ||||
![]() | ![]() | ![]() | ![]() | ![]() |