Tuesday, 3 September 2013

How to Use ASP.NET AJAX DYNAMIC POPULATE EXTENDER CONTROL

How to Use ASP.NET AJAX DYNAMIC POPULATE EXTENDER CONTROL





1) Create Website2) Add aspx page
3) Add toolkitScriptManager
4) If you don't have ajax control toolkit  download from codeplex
5) Add Collapsible Panel Extender



asp:DynamicPopulateExtender Properties
1) TargetControlID --> Data will be updated here Label/Panel etc.,
2) PopulateTriggerControlID -> This is optional Html Control through which page method will be called
3)ServiceMethod  -> gets the data
4)ClearContentsDuringUpdate -> true/false

This example gets the server time using asp:DynamicPopulate Extender

    <asp:Label ID="lblTime" runat="server" Text="time displayed here"></asp:Label>

    <input type="button" value="Get Server Time" id="btnGetHtml" />
   
 
        <asp:DynamicPopulateExtender ID="DynamicPopulateExtender1" runat="server"
         TargetControlID="lblTime" PopulateTriggerControlID="btnGetHtml" ServiceMethod="GetDynamicContent"
           ClearContentsDuringUpdate="true">
        </asp:DynamicPopulateExtender>



No comments:

Post a Comment