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"
/>