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:ToolkitScriptManager>
<asp:Datalist ID="Datalist_NewsItems" runat="server" Width="60%">
<ItemTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="800">
<tr>
<td width="600">
<asp:Panel ID="Panel2" runat="server">
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/plus.jpg" ></asp:Image>
<%#Eval("Title").ToString()%>
</asp:Panel>
</td>
</tr>
<tr>
<td colspan="3">
<asp:Panel ID="Panel1" runat="server" BorderStyle= "Outset">
<strong>Abstract:</strong>
<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:Panel>
<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>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Datalist>
<asp:Panel ID="news_details" CssClass="ModalPanel" runat="server">
<p><strong><font size="6">Details Page</font></strong></p>
</asp:Panel>
<asp:ModalPopupExtender ID="PopupExtender" TargetControlID="HyperLink_FullStory" PopupControlID="news_details" BackgroundCssClass="modalBackground" runat="server"></asp:ModalPopupExtender>
Thanks.