im working with asp.net 2.0 and im using master pages.i have a link to a pdf file...when i click on the link i want the pdf to open within the contentplaceholder.im using iframe within the content placeholder.my master page code is below:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="jm.master.cs" Inherits="jm" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>Prison Department, Goa</title> 
    <link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" /> 
  
    <script language="JavaScript" type="text/javascript"> 
            var newBg; 
            function changeHl(strId) 
            { 
               newBg = "images/HlImg/"+strId+".jpg"; 
               document.getElementById("imgHL").src = newBg;           
            } 
    </script> 
  
</head> 
<body> 
    <form id="mst" runat="server"> 
  
        <div id="wrapper"> 
            <div id="header"> 
                <div style="color: #FFFFFF; font-family: 'Maiandra GD', 'Trebuchet MS', Tahoma, Verdana;"> 
                    <table id="tbl" width="100%"> 
                        <tr> 
                            <td align="center" style="width: 145px"> 
                                <img src="images/bg_charity1.jpg" alt="gov" style="width: 76px; height: 84px" /></td> 
                            <td> 
                                <div style="font-size: 24px;"> 
                                    Inspector General of Prisons</div> 
                                <div style="font-size: 16px;"> 
                                    Government of Goa</div> 
                            </td> 
                        </tr> 
                    </table> 
                </div> 
                <div id="navlist"> 
                    <ul id="Ul1"> 
                        <li><a id="hm" href="index.html">Home</a></li> 
                        <li><a id="au" runat="server" href="AboutUs.aspx">About Us</a></li> 
                        <li><a id="am" runat="server" href="Amenities.aspx">Amenities</a></li> 
                        <li><a id="ne" runat="server" href="newsandevents.aspx">News & Events</a></li> 
                        <li><a id="pr" runat="server" href="jailproducts.aspx">Products</a></li> 
                        <li><a id="rti" runat="server" href="rghtoinfrmtn.aspx">R. T. I.</a></li> 
                        <li><a id="cc" runat="server" href="remission.aspx">Remission</a></li> 
                        <li><a id="fb" runat="server" href="Default2.aspx">Feedback</a></li> 
                        <li><a id="cu" runat="server" href="contact.aspx">Contact Us</a></li> 
                    </ul> 
                </div> 
            </div> 
            <div id="headline"> 
                <div id="photo"> 
                    <div> 
                        <img src="images/igp.gif" width="618" height="250" alt="Pic 1" /> 
                    </div> 
                </div> 
                <div id="search-news" style="height: 248px"> 
  
                    <h2 class="downcast"> 
                        Quick Links</h2><br /> 
                    <div id="plussbullets"> 
                        <ul> 
                            <li><a href="stats.aspx"> 
                                Prison Statistics</a></li> 
                            <li><a href="rightsandduties.aspx"> 
                                Rights & Duties of Prisoners</a></li> 
                            <li><a href="reformation.aspx"> 
                                Jail Reformation</a></li> 
                                <li><a href="Citizen_new.pdf" target="myspot">  
                                Citizen's Charter</a></li> 
                            <li><a href="listaddoff.aspx"> 
                                List of area wise offices and Judicial Lock-Ups</a></li> 
                            <li><a href="orgchart.aspx"> 
                                Organisational Setup</a></li> 
                        </ul> 
                    </div> 
                </div> 
                <div class="clear"> 
                </div> 
            </div> 
            <div id="body"> 
                <asp:ContentPlaceHolder ID="cplMain" runat="server"> 
                <iframe runat="server" id="myspot" name="myspot" width="75%" height="200"> 
Sorry, your browser doesn't support iframes. 
</iframe>  
  
                </asp:ContentPlaceHolder> 
                &nbsp;</div> 
            <div class="clear"> 
            </div> 
        </div> 
        <div id="footer"> 
            <p> 
                &copy; 2009 all rights reserved.</p> 
            <p> 
                Developed &amp; Maintained by Goa Electronics Limited 
            </p> 
            <p> 
                www.goaelectronics.co.in</p> 
  
        </div> 
    </form> 
  
</body> 
</html>

i want the citizen_chart.pdf to open within the iframe....the other links open in the content placeholder.each of the other pages reference the master page,so all the links are seen in every page.so whenever i click on the citizen charter lik the pdf should open in the iframe within the contentplaceholder....any idea how i can do it...plz help

>open pdf within iframe in contentplaceholder

Nope. You can't do that. The ContentPlaceHoder control reserves the area for content pages so the content pages can add page specific content.

Add a content page and put Iframe in it.

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.