Example of source code for DOTNET with Ajax + XML

Source: Internet
Author: User
Tags dotnet

Available for download

. Net often uses a three-level provincial/municipal LinkageCode, I dragged these files out. You can use them directly by referring to the following.
It can help. NET developers save time
Help:

1. Add HTML controls to the foreground
<Script language = "JavaScript" src = "JS/PCA. js"> </SCRIPT>

<! -- Province, city -->
<Input id = "lbl_provice" type = "text" runat = "server" style = "display: none" value = "Zhejiang">
<Input id = "lbl_city" type = "text" runat = "server" style = "display: none" value = "Hangzhou">
<Input id = "lbl_area" type = "text" runat = "server" style = "display: none">
Drag and Drop three dropdownlist controls at the front end: dropdownlist1, dropdownlist2, and dropdownlist3

2. Add code on the CS page
Copy the code in XML of Ajax-level three provincial/municipal linkages to your project-> In class1.cs
REFERENCE The namespace using system. xml at the same time;
Add
Ajax. Utility. registertypeforajax (typeof (Register); // register refers to the class name of your page. If you change it, replace the class name called in PCa. js.
Binddropdownlist ();

3. Copy the chinaarea. xml file to your project and directory.

4. Configure Ajax in Web. config
<System. Web>
<Httphandlers>
<Add verb = "post, get" Path = "ajax/*. ashx" type = "Ajax. pagehandlerfactory, Ajax"/>
</Httphandlers>
</System. Web>

Demo download

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.