Magicajax instructions 1 (ajax, ajaxpro, magicajax)

Source: Internet
Author: User
1. Open vs and add MagicAjax. dll. Then there will be an AjaxPanel control. Drag it up. (Easy !)
2. Open web. config and add:

<ConfigSections>
<Section name = "magicAjax" type = "MagicAjax. Configuration. MagicAjaxSectionHandler, MagicAjax"/>
</ConfigSections>

<System. web>
...
<HttpModules>
<Add name = "MagicAjaxModule" type = "MagicAjax. MagicAjaxModule, MagicAjax"/>
</HttpModules>
...
</System. web>

The above two steps can be used to implement Ajax, isn't it easy. If you think loading... is ugly, come on.

3. First, download the magicAjax source code and copy the script directory to your directory.

4. Open web. config and add:

<MagicAjax tracing = "false" scriptPath = "~ /Script ">
<PageStore/>
</MagicAjax>

5. Open the script directory, edit AjaxCallObject. js (at the end), find it, and change it to the following,
.....
Function CreateWaitElement (){
Var elem = document. getElementById ('_ AjaxCall_Wait ');
If (! Elem ){
Elem = document. createElement ("div ");
Elem. id = '_ AjaxCall_Wait ';
Elem. style. position = 'absolute ';
Elem. style. height = 17;
Elem. border = "1px ";
Elem. style. paddingLeft = "3px ";
Elem. style. paddingRight = "3px ";
Elem. style. fontSize = "12px ";
Elem. style. borderColor = "#990000 ";
Elem. style. borderWidth = "0 ";
Elem. style. borderStyle = "solid ";
Elem. style. backgroundColor = "#990000 ";
Elem. style. color = "# FFFFFF ";
Elem. innerHTML = "loading ...";
Elem. style. visibility = 'hiden ';

Document. body. insertBefore (elem, document. body. firstChild );
}
WaitElement = elem;
}
// End wait element

Try it and see how it works. How can it be garbled? Don't worry, change it.

6. Open web. config and change
First: <? Xml version = "1.0" encoding = "gb2312"?>
Second: add
<Globalization
RequestEncoding = "gb2312"
ResponseEncoding = "gb2312"
/>

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.