I have seen codeproject many times. I have recently published a set of very useful Ajax server controls, which are highly praised.
| 51 votes for this article. |
|
| Popularity: 8.06. rating:4.72Out of 5. |
I. simple and clear design ideas
In the past, the framework we used or directly used XMLHTTP to directly implement Ajax would inevitably need to write some JavaScript scripts, and this is the biggest highlight (originally intended to use selling points, but the open source project is another open-source project. It does not have to be used to write JS scripts, and The use cost is very low. I carefully observed some of his source code yesterday and thought that the author's idea is indeed good, it is simple and clear. in a strict sense, this is not a framework, but a well-encapsulated control, and it feels simpler than the Atlas control that Microsoft will launch, maybe ajaxpro, which released source code a few days ago, can write such a set of controls;
Ii. Easy to use
Take the simplest demo above: Introduction Using buttons and labels as an example.
His steps are: Steps
1. Add a register directive to the top of your page:
<% @ Register tagprefix = "Anthem" namespace = "Anthem" assembly = "Anthem" %>
2. Add an anthem: button control to your page:
<Anthem: button id = "button" runat = "server" text = "Click me! "/>
3. Add an anthem: Label control to your page:
<Anthem: Label id = "label" runat = "server"/>
4. Add a handler for the button's click event either by double-clicking on the button in the designer or by adding an onclick attribute to the button's tag:
<Anthem: button id = "button" runat = "server" text = "Click me! "Onclick =" button_click "/>
5. implement the handler in your code behind class or in a server-side script block in your page. set the text property like a normal label control but make sure you set the updateaftercallback property to true or you won't see the change reflected on the page:
<SCRIPT runat = "server">
Void button_click (Object sender, eventargs E)
{
Label. Text = datetime. Now. tostring ();
Label. updateaftercallback = true;
}
</SCRIPT>
Later, I thought that the first 1234 steps were not needed. I added [Assembly: tagprefix ("Anthem", "Anthem")] To the namespace of each control in its source code.
This saves some time, but the author does not add it. As for the five-step button_click script, it can be written to the CS script. Isn't it the same as the general control?
Iii. Support for vs2003 and vs2005
There are many Macros in the code, and two versions are supported at the same time!
If you are interested, let's take a look. I believe you can benefit from it ......
Http://hedonister.cnblogs.com/archive/2006/02/22/335272.html