Ajax Control Toolkit 1.0 official edition 32 server-side controls

Source: Internet
Author: User
Since the official release of Asp.net Ajax, focusing on the ajaxcontroltoolkit, the addition of four controls is really interesting and there are still new gains and doubts about the other 28 controls. Because I have written two articles before, [Latest Version] Asp.net Ajax programming Memorandum-28 server-side controls in detail [original]
[Asp.net Ajax RC version] Asp.net Ajax programming memorandum ---- let's talk about 28 server-side controls that do not dare to copy and paste, focus on changes, and summarize the gains.
[1] accordion
1. It does not need to be placed in updatepanel.
2. var behavior = $ find ('ctl00 _ samplecontent_myaccordion_accordionextender '); this method is not good, and this version has not been improved.
However, we found a better way to write code on the automatic test page: var behavior = $ find ("<% = myaccordion. clientid %> _ accordionextender ");
[2] alwaysvisiblecontrol
1. var label = Document. getelementbyid ('ctl00 _ samplecontent_currenttime ');
VaR label = $ get ('ctl00 _ samplecontent_currenttime ');
2. If we do not want to dynamically display the time, we do not need to use updatepanel. We made a simple:
<Asp: Panel id = "Panel1" runat = "server"
Width = "220px" backcolor = "white" forecolor = "darkblue"
Borderwidth = "2" borderstyle = "solid" bordercolor = "darkblue" style = "Z-index: 1;">
<Div style = "width: 100%; Height: 100%; Vertical-align: middle; text-align: center;">
<P> current time: </P>
<Span id = "span1" runat = "server" style = "font-size: XX-large; font-weight: bold; line-Height: 40px;"/>
</Div>
</ASP: Panel>
<Ajaxtoolkit: alwaysvisiblecontrolextender id = "alwaysvisiblecontrolextender1" runat = "server"
Targetcontrolid = "Panel1"
Verticalside = "TOP"
Verticaloffset = "10"
Horizontalside = "right"
Horizontaloffset = "10"
Scrolleffectduration = ". 1"/>
[3] Animation
1. The official page file adds annotations to the animation script to make it clearer and easier to understand.
2. Check that anmation reference has not added any new content. It has been described in detail before and will not be repeated.
3. No need for updatepanel
[4] AutoComplete (new !)
1. It is an extension of the text box.
2. There are requirements for the Web service method signature to be called:
[Webmethod]
Public String [] getcompletionlist (string prefixtext, int count ){...
3. minimumprefixlength: the minimum number of prefix characters. That is to say, you must enter at least a few characters before a prompt is displayed.
4. No need for updatepanel
[5] calendar new!
1. It is also an extension of the text box. If the text box gets the focus, the date selection will appear, and the style can be customized.
2. Although it must be an extension of the text box, we can still specify the pop-up button popupbuttonid. Once this value is set, the text box won't display the date selection.
3. No need for updatepanel
[6] cascadingdropdown
No changes have been made. I have already mentioned it in detail, but the code for using updatepanel in it is indeed worth looking.
<Asp: updatepanel id = "updatepanel1" runat = "server" updatemode = "Conditional" rendermode = "inline">
<Contenttemplate>
<Asp: Label id = "label1" runat = "server" text = "[no response provided yet]"/>
</Contenttemplate>
<Triggers>
<Asp: asyncpostbacktrigger controlid = "dropdownlist3" eventname = "selectedindexchanged"/>
</Triggers>
</ASP: updatepanel>
[7] collapsiblepanel
This old classic has not changed; but there is still a question:
Textlabelid = "label1" does this attribute have any deep \ Advanced Operations? I did not find
2. No need for updatepanel
[8] confirmbutton
Updatepanel is used because the time needs to be dynamically displayed.
Stick to the previous opinion. If the server needs to obtain the user's choice, let's use the pop-up mode.
[9] dragpanel
Did you find this code? If this code is removed, It is abnormal when the figure goes from the east to the edge of the page.
<SCRIPT type = "text/JavaScript">
// The following snippet works around a problem where floatingbehavior
// Doesn' t allow drops outside the "content area" of the page-Where "content
// Area "is a little unusual for our sample Web pages due to their use of CSS
// For layout.
Function setbodyheighttocontentheight (){
Document. Body. style. Height = math.max(document.doc umentelement. scrollheight, document. Body. scrollheight) + "PX ";
}
Setbodyheighttocontentheight ();
$ Addhandler (window, "resize", setbodyheighttocontentheight );
</SCRIPT>
2. No need for updatepanel
[10] dropdown
I made an attempt to expand the text box and select the text box as directly reflected in the text box. The effect is good. Check the Code:
<Asp: updatepanel id = "OK" runat = "server">
<Contenttemplate>
<Asp: textbox id = "show" runat = "server"> </ASP: textbox>
<Asp: Panel id = "droppanel" runat = "server" cssclass = "contextmenupanel" style = "display: none; visibility: hidden;">
<Asp: linkbutton runat = "server" id = "option1" text = "option 1" cssclass = "contextmenuitem" onclick = "onselect"/>
<Asp: linkbutton runat = "server" id = "option2" text = "option 2" cssclass = "contextmenuitem" onclick = "onselect"/>
<Asp: linkbutton runat = "server" id = "option3" text = "option 3 (Click me !) "Cssclass =" contextmenuitem "onclick =" onselect "/>
</ASP: Panel>
<Ajaxtoolkit: dropdownexw.runat = "server" id = "DDE"
Targetcontrolid = "show"
Dropdowncontrolid = "droppanel"/>
</Contenttemplate>
</ASP: updatepanel>
<Asp: updatepanel id = "Update" runat = "server">
<Contenttemplate>
<Asp: Label id = "lblselection" runat = "server" style = "padding: 5px;"/>
</Contenttemplate>
<Triggers>
<Asp: asyncpostbacktrigger controlid = "option1" eventname = "click"/>
<Asp: asyncpostbacktrigger controlid = "option2" eventname = "click"/>
<Asp: asyncpostbacktrigger controlid = "option3" eventname = "click"/>
</Triggers>
</ASP: updatepanel>
[11] dropshadow is a saying that Web2.0 users can define everything, including the border radian
[12] dynamicpopulate can call client scripts in addition to Web Services. How can this method be called? I looked at the code for automated testing and found no clue.
Customscript-the script to invoke instead of calling a web or PAGE method. This script must evaluate to a string value.
[13] filteredtextbox has been specially discussed and provides better solutions
Http://www.cnblogs.com/me-sa/articles/603217.html
[14] the previous two articles on hovermenu have listed the details one by one.
[15] Will maskededit be used in this way? I will not use it in the project.
[16] modalpopup is now normal in opera. I compared the code and made some improvements.
[17] mutuallyexlcusivecheckbox nothing changed!
[18] nobot is enough for simple protection.
[19] numericupdown is still much different from winform in use on the page, and it seems a little lagging behind in data display.
[20] pagingbulletedlist nothing changed!
[21] passwordstreng is used when Microsoft Live is registered.
[22] When popupcontrol saw this example, I couldn't help but smile. Isn't the first text box calendar?
[23] rating was a friend who raised an objection and said he liked it.
[24] reorderlist nothing changed!
[25] resizablecontrol: Some customers have put forward this requirement. Later, they made a demo to remove this requirement.
[26] Will roundedcorners be implemented using code? Or to the artist?
[27] slider Sina used pagination some web used to indicate heat
[28] tabs is the most useful new control I think
The encoding style is the same as that of all nested controls:
<Ajaxtoolkit: tabcontainer runat = "server"
Onclientactivetabchanged = "clientfunction"
Height = "150px">
<Ajaxtoolkit: tabpanel runat = "server"
Headertext = "signature and bio"
<Contenttemplate>
...
</Contenttemplate>
/>
</Ajaxtoolkit: tabcontainer>
The demo effect makes it easy for us to compare the homepage after the recent revision with the Sina homepage and accordion. It is a transplantation of the classic winform.
[29] textboxwatermark looked at dozens of Web websites. unexpectedly, the most common effect was the watermark effect. The most direct prompt was that the practical value was relatively high.
[30] togglebutton: I have seen it too. Someone is using it. I used to be too subjective.
[31] updatepanelanimation noting changed!
[32] validatorcallout is very useful. It is easier to find out than red asterisks ,:)
Full text
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.