[Tips] AjaxToolKit Part Hacks

Source: Internet
Author: User
Document directory
  • 1. Performance Improvement
  • 2. Brower Compatibility
  • 3. Add A Loading apperance which make the page gray or transport, and set the cursor to wait.

It has been existed for a long time. however, I wowould like to make a collection for later check. this tip is written in english, because, I feel a little tired and sort of unwilling to speak.

1. Performance Improvement
A. Remove Uesless HttpModules

Full HttpModules list located in C: \ Windows \ Microsoft. NET \ Framework \ v2.0.50727 \ CONFIG \ web. config

<HttpModules>
<Add name = "OutputCache" type = "System. Web. Caching. OutputCacheModule"/>
<Add name = "Session" type = "System. Web. SessionState. SessionStateModule"/>
<Add name = "WindowsAuthentication" type = "System. Web. Security. WindowsAuthenticationModule"/>
<Add name = "FormsAuthentication" type = "System. Web. Security. FormsAuthenticationModule"/>
<Add name = "PassportAuthentication" type = "System. Web. Security. PassportAuthenticationModule"/>
<Add name = "RoleManager" type = "System. Web. Security. RoleManagerModule"/>
<Add name = "UrlAuthorization" type = "System. Web. Security. UrlAuthorizationModule"/>
<Add name = "FileAuthorization" type = "System. Web. Security. FileAuthorizationModule"/>
<Add name = "AnonymousIdentification" type = "System. Web. Security. AnonymousIdentificationModule"/>
<Add name = "Profile" type = "System. Web. Profile. ProfileModule"/>
<Add name = "ErrorHandlerModule" type = "System. Web. Mobile. ErrorHandlerModule, System. Web. Mobile, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a"/>
<Add name = "ServiceModel" type = "System. ServiceModel. Activation. HttpModule, System. ServiceModel, Version = 3.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089"/>
</HttpModules>

You cocould make your own httpmodule list by setting in the HttpModules Section in web. config

<HttpModules>
<! -- Remove the modules which will not be used then, for a better performance -->
<! -- Remove name = "WindowsAuthentication"/-->
<Remove name = "PassportAuthentication"/>
<Remove name = "FileAuthorization"/>

Caching, ProcessModel Detailed Setting.

See Full Guide:Improving. NET ApplicationPerformanceAnd Scalability

B. Setting Properties to ScriptManager and UpdatePanel

<Asp: ScriptManager ID = "ScriptManager1" AsyncPostBackTimeout = "36000" EnablePartialRendering = "true" runat = "server" LoadScriptsBeforeUI = "false" ScriptMode = "Release"/>

Set the UpdateModel to UpdatePanel, Conditional will help a lot

2. Brower Compatibility

For IE 6

A. part of the background is white:

Add a style to the target CssClass

Position: absolute;
Top: expression(eval(document.doc umentElement. scrollTop) + "px ");

B. Accordion Can not run

Check the security setting of you internet explorer. For IE6: the security need to be medium or even lower.

For IE6/IE7

A. When the page first load, the ModalPopUp Panel rather than hide, it appear once, then hide

Add style = "display: none" in panel label.

Notice: do it in the panel label <asp: Panel Id = "xxx" style = "display: none" runat = "server"/>

3. Add A Loading apperance which make the page gray or transport, and set the cursor to wait.

Add the script below to the page

<Script type = "text/javascript">
Var prm = Sys. WebForms. PageRequestManager. getInstance ();;
Prm. add_initializeRequest (InitializeRequest );
Prm. add_endRequest (EndRequest );

// Hook into InitializeRequest
Function InitializeRequest (sender, args ){

// Get a reference to the element that raised the postback,
// And disables it.
// $ Get (args. _ postBackElement. id). disabled = true;
Document. body. className = "Progressing ";
}

// Hook into the EndRequest event
Function EndRequest (sender, args ){
// $ Get (args. _ postBackElement. id). disabled = false;
Document. body. className = "ProgressComplete ";

}

</Script>

Css Style

. Progressing
{
Filter: gray;
Cursor: wait;
}

. ProgressComplete
{
Cursor: auto;
}

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.