The Ajax of ASP.

Source: Internet
Author: User
This two-day training of the. Net framework gives me a better understanding of what Microsoft is doing. I used to think that the thing about MS was drag and drop, and there was no other feature that was more surprising. Today, the introduction of ASP AJAX Toolkit, it is really surprising.

To give some simple examples, for example, to add one such effect, a TextBox input 2 numbers, to have the associative function of all databases or Web service on the list of these two numbers. Only one sentence is allowed in ASP.

<ajaxtoolkit:autocompleteextender
Id= "AutoCompleteExtender1"
Targetcontrolid= "ZipCode"
Servicepath= "Zipcodeservice.asmx"
Servicemethod= "Getmatchingzipcodes"
Minimumprefixlength= "2"
Completionlistelementid= "Ctl00_mainplaceholder_zipcodecomp
Letionlist "
Completionsetcount= "runat=" "Server"/>

It's too easy, but it's much more troublesome to do it in the Java EE, but it's much easier to do it with the AJAX framework built on the Java EE like dwr.

Again, for example, a zipcode should be prompted to enter a 5-digit number. The first thing to filter, just keep the numbers and-. Another sentence, the phone number should be the same:

<ajaxtoolkit:filteredtextboxextender
Id= "FilterTextBoxExtender1"
Targetcontrolid= "ZipCode" filtertype= "Custom"
validchars= "0123456789-"
runat= "Server"/>

<ajaxtoolkit:filteredtextboxextender
Id= "FilterTextBoxExtender2"
Targetcontrolid= "Phone" filtertype= "Custom"
Validchars= "0123456789 ()-."
runat= "Server"/>

Then you are prompted to enter a 5 number

<ajaxtoolkit:textboxwatermarkextender
Id= "TextBoxWatermarkExtender1"
Targetcontrolid= "ZipCode" watermarktext= "xxxxx"
runat= "Server"/>

<ajaxtoolkit:textboxwatermarkextender
Id= "TextBoxWatermarkExtender2"
Targetcontrolid= "Phone" watermarktext= "xxx-xxx-xxxx"
runat= "Server"/>

That's what it shows.

  • Related Article

    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.