Home > Article > Backend Development > ASP.net的AJAX
The .Net framework training in these two days has given me a better understanding of Microsoft stuff. In the past, I just thought that MS things were just dragged here and there, and there were no other more surprising features. After introducing ASP AJAX ToolKit today, it was really surprising.
To give some simple examples, for example, if you want to add such an effect, after entering two numbers into a Textbox, you need to have an association function to list all databases or web services starting with these two numbers. Just one sentence is enough in ASP.NET.
TargetControlID="ZipCode"
ServicePath="ZipCodeService.asmx"
ServiceMethod="GetMatchingZipCodes"
MinimumPrefixLength="2"
CompletionListElementID="ctl 00_MainPlaceHolder_ZipCodeComp
letionList"
CompletionSetCount= "15"runat="server"/>
It's too simple. It would be much more troublesome to do it in j2ee. However, with the AJAX framework built on J2EE such as DWR, it is much easier to do it.
For another example, a ZipCode should prompt you to enter 5 numbers. First, filter to keep only numbers and -. Another sentence, the phone number should also be like this:
TargetControlID="ZipCode"FilterType="Custom"
ValidChars="0123456789-"
runat="server"/> ;
TargetControlID="Phone"FilterType="Custom"
ValidChars="0123456789()-."
runat="server"/>
Then prompt to enter 5 Numbers
TargetControlID="ZipCode"WatermarkText="xxxxx"
runat="server"/>
TargetControlID ="Phone"WatermarkText="xxx-xxx-xxxx"
runat="server"/>
The displayed effect is like this