Hello All,

I have a Collapsible Panel Extender inside a datalist.I have a hyperlink inside the panel within the datalist. I want to have a modal popup on clicking the hyperlink inside the panel and I want the modal pop up to be populated with the data from the navigate URL property of the hyperlink. Is it possible to do this? If yes,please give your suggestions.

I am attaching my code,this is currently throwing an exception which I am guessing is because it is unable to find the hyperlink in the panel within the datalist :-

<asp:ToolkitScriptManager ID="ToolkitScriptManager_CollapsiblePanel" runat="server">
     <asp:Datalist ID="Datalist_NewsItems" runat="server" Width="60%">

      <table border="0" cellpadding="0" cellspacing="0" width="800">
       <td width="600">
          <asp:Panel ID="Panel2" runat="server">
            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/plus.jpg" ></asp:Image>
        <td colspan="3">
    <asp:Panel ID="Panel1" runat="server" BorderStyle= "Outset">
     <asp:Label ID="Label_Abstract" runat="server" Text='<%#Eval("Abstract").ToString()%>'></asp:Label>
     <br />
     <asp:HyperLink ID="HyperLink_FullStory" runat="server" Text="Full Story" NavigateUrl='<%#Eval("LinkAddress")%>'></asp:HyperLink>
    <asp:CollapsiblePanelExtender ID="CollapsibleControl_Name" ExpandControlID="Panel2" runat="server" ImageControlID="Image1" ExpandedImage="~/images/minus.jpg" CollapsedImage="~/images/plus.jpg" ExpandDirection="Vertical" CollapseControlID="Panel2" Collapsed="true" EnableViewState="false" TargetControlID="Panel1"></asp:CollapsiblePanelExtender>

    <asp:Panel ID="news_details" CssClass="ModalPanel" runat="server">
    <p><strong><font size="6">Details Page</font></strong></p>
        <asp:ModalPopupExtender ID="PopupExtender" TargetControlID="HyperLink_FullStory" PopupControlID="news_details" BackgroundCssClass="modalBackground" runat="server"></asp:ModalPopupExtender>


Can someone please help me out here!


For modal pop up be populated with data from a URL .

You can put logic at anywhere


and it will popup after this code.

For more detail check this link.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.