Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a modal pop up be populated with data from a URL?

Status
Not open for further replies.

collegian

Programmer
Jul 1, 2010
64
US
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.

The following is the code:

<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.
 
the simple answer is yes it can. from the browser point of view is just urls and html. now, how all of this is built is dependent on the framework. webforms is probably the most convoluted web framework and as such simple things like ajax and modals becomes more difficult than it should.

the exact details I'm not sure of. MVC has made web development much easier, as such I haven't used webforms or ms ajax in a number of years. Rick Strahl has done some amazing things with webforms and ajax. There may be something on his blog which you can us to develop a solution. you may have to dig way back into his archives to find relevant information. Most developers I see today use jquery for there scripting needs instead of ms ajax.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Thank you very much for the reply.I figured out that I can use iframe to do what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top