Skip Navigation LinksHome > SSW Standards > Better Software Suggestions > Microsoft ASP.NET AJAX suggestions

Microsoft ASP.NET AJAX suggestions

  1. Have a different icon for currently expanded pane in the ASP.NET AJAX toolkit please

    The accordion control in the ASP.NET AJAX toolkit (on CodePlex)You are going to a site outside of SSW needs to indicate visually which Panel is currently expanded. The current version of the accordion control has no distinguishing icon when expanded.

    ASP.NET Ajax - bad example
    Bad example - icons are all the same regardless. The current version of Microsoft Ajax Accodion control doesn't have properties for setting those icons.
    ASP.NET Ajax - recommended example
    Recommended example - Different icon indicates which Panel is currently expanded
        <ajaxToolkit:Accordion 
            ID="MyAccordion" 
            runat="server" 
            SelectedIndex="0" 
            HeaderCssClass="accordionHeader"
            ContentCssClass="accordionContent" 
            FadeTransitions="false" 
            FramesPerSecond="40"
            TransitionDuration="250" 
            ExpandedImage="~/images/collapse_blue.jpg"
            CollapsedImage="~/images/expand_blue.jpg"        
            AutoSize="None">
    Recommended code example - ExpandedImage and CollapsedImage properties are required. These properties are not available in the Accordion control of the current version of ASP.NET AJAX toolkit.
  2. Add a function to WaterMark to check the value changed by scripts.

    Watermark is an ASP.NET AJAX extender. It can be attached to an input control to get the "watermark" behaviour.
    But this can not handle the value changes made by other conrols, so that the input control's value will be lost when submitting the page.
    A better wartermark entender will check the text every time it changes.

Acknowledgements

Adam Cogan
Peter Ahn