im working with 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 using iframe within the content 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" ""> 
<html xmlns=""> 
    <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;           
    <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%"> 
                            <td align="center" style="width: 145px"> 
                                <img src="images/bg_charity1.jpg" alt="gov" style="width: 76px; height: 84px" /></td> 
                                <div style="font-size: 24px;"> 
                                    Inspector General of Prisons</div> 
                                <div style="font-size: 16px;"> 
                                    Government of Goa</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> 
            <div id="headline"> 
                <div id="photo"> 
                        <img src="images/igp.gif" width="618" height="250" alt="Pic 1" /> 
                <div id="search-news" style="height: 248px"> 
                    <h2 class="downcast"> 
                        Quick Links</h2><br /> 
                    <div id="plussbullets"> 
                            <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> 
                <div class="clear"> 
            <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. 
            <div class="clear"> 
        <div id="footer"> 
                &copy; 2009 all rights reserved.</p> 
                Developed &amp; Maintained by Goa Electronics Limited 

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 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.