Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

ASP.NET Webform AJAXToolKit Binding Repeater in User Control ASCX

$
0
0

Hello,

I am converting an user control ascx which uses DevExpressPopUpControl to AjaxTookKit modal dialog. I am not familiar with Ajax control and trying to figure out how bind data to repeaters control inside the AJAX control user control.

In the C# code, I already define the strList. I am not sure about what is Container.DataItem.

In the original code, the DevExpress PopUp Control has an ID which is PopUpDialog and the C# call PopUpDialog.DataBind().

The StrList is coded as StrList = List<string> object.

Now I moved the repeater control inside an ASP Panel.

How do I bind the data to the repeater inside the new Panel? The data is just text.

Thanks and Appreciate any help.

<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="Panel1" TargetControlID="btnSubmit"
    CancelControlID="btnClose" BackgroundCssClass="modalBackground"></cc1:ModalPopupExtender><asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" align="center" style = "display:none"><div><asp:Panel ID="consentContent" runat="server"><asp:Repeater runat="server" DataSource="<%# strList %>"><HeaderTemplate><ol></HeaderTemplate><ItemTemplate><li style="float:none"><%# Container.DataItem %></li></ItemTemplate><FooterTemplate></ol><div class="spacer"></div><asp:CheckBox ID="chkCertify" ClientIDMode="Static" runat="server" Text= <%#"Test") + " above. "%> /></FooterTemplate></asp:Repeater></asp:Panel></div><asp:Button ID="btnClose" runat="server" Text="Close" /></asp:Panel>


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>