ASP.net的AJAX

巴扎黑
Release: 2016-12-20 15:20:57
Original
1273 people have browsed it

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.

ID="AutoCompleteExtender1"
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:

ID="FilterTextBoxExtender1"
TargetControlID="ZipCode"FilterType="Custom"
ValidChars="0123456789-"
runat="server"/> ;

ID="FilterTextBoxExtender2"
TargetControlID="Phone"FilterType="Custom"
ValidChars="0123456789()-."
runat="server"/>

Then prompt to enter 5 Numbers

ID="TextBoxWatermarkExtender1"
TargetControlID="ZipCode"WatermarkText="xxxxx"
runat="server"/>

ID="TextBoxWa termarkExtender2"
TargetControlID ="Phone"WatermarkText="xxx-xxx-xxxx"
runat="server"/>

The displayed effect is like this


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!