Problems with content page in asp.net using master page

I'm having a problem inside of the content page in asp.net that is using a master page.  My site is  an intranet site and when I place a link to a file or another html or asp page it opens the page but not in the content area.  I have tried using the various target="" and that hasn't worked.  I'm still learning asp.net and have read quite a bit, but most everything I've read concerns database content or putting the information directly in the content area.  I have documents an other files that cannot be coded directly into the content area and need their own, whether this is because it is and html/asp fille or a document such as word or a pdf.  I'm allowing 250 points for this one, however if the solution provider gives a complete solution and not simple links for me to spend days and hours researching (which I've already done), then I will increase the points to 500.  I have used Microsoft's Expression Web 3 for much of the development.

The code for the content page is:
<%@ Page language="VB" masterpagefile="Main_Page.master" title="Calvin" %>
<asp:Content id="Content3" runat="server" contentplaceholderid="main">

      
      <div id="1">
      
      <a href="/emergency_planning/default.asp" target"_self">Emergency Planning</a>

      
      <!--end content -->

      
      </div>      

</asp:Content>

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>

<!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 runat="server">
    <title>JCMH -&nbsp; Calvin Intranet</title>
    <link rel="stylesheet" type="text/css" href="css/sdmenu.css">

	
    <style type="text/css">
        a {
		color: #800080;
	}
	a:visited {
		color: #008080;
	}
	a:active {
		color: #FFFF00;
	}
	a:hover {
		color: #FFFF00;
	}
	.sidebarnav {
		font: normal 10px Tahoma, Geneva, sans-serif;
		color: #000;
		width: auto;
		margin: 5px 10px 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
		height: auto;
		border: 2px solid #008;
		padding: 1px;
		line-height: 10px; /*link text is indented 8px*/;
		text-decoration: none;
		background-color: #FFF;
		float: none;
	}
	#container {
		width: 1000px;
		margin-left: auto;
		margin-right: auto;
		background-color: #FFFFFF;
		margin-top: 1px;
	}
	#banner {
		width: 1000px;
		height: 100px;
		background-color: #4A6E90;
	}
    .col_left {
		float: left;
		width: 10%;
	}
	.col_middle {
		float: left;
		color: #FF6A00;
		width: 48%;
		height: 80px;
	}
    .mid_left {
		float: left;
		font-family: Verdana;
		font-weight: bold;
		font-size: 66px;
		width: 48%;
		bottom: 0em;
	}
    .mid_right {
		float: right;
		color: #FFFFFF;
		font-size: 12px;
		font-weight: bold;
		font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
		left: 1em;
		bottom: 0em;
		width: 48%;
	}
    .col_right {
		float: left;
		width: 15%;
		right: 10px;
		left: 10px;
		clip: rect(auto, 10px, auto, auto);
	}
    #main {
		
	}
	#content1 {
		padding: 0px;
		background-color: #FFFFFF;
		float: right;
		margin-top: 1px;
		margin-left: 1px;
	}
	

	/* Begins Left Navigation Area */
    #nav_box {
		background-position: #4A6E90;
		margin-top: 1px;
		float: left;
		width: 210px;
		height: auto;
		font-family: Arial, sans-serif;
		font-size: 10px;
		padding-bottom: 0px;
		background: #4A6E90;
		text-align: left;
	}
	div.nav_boxdiv {
		background: url('title.gif') repeat-x;
		overflow: hidden;
		width: 206px;
	}
div.nav_boxdiv:first-child {
	background: url('toptitle.gif') no-repeat;
	width: 206px;
}
div.nav_boxdiv.collapsed {
	height: 25px;
}
div.nav_boxdiv span {
	display: block;
	padding: 5px 25px;
	font-weight: bold;
	color: white;
	background: url('expanded.gif') no-repeat 10px center;
	cursor: default;
	border-bottom: 1px solid #ddd;
}
div.nav_boxdiv.collapsed span {
	background-image: url('collapsed.gif');
}
div.nav_boxdiv a {
	background: #eee;
	display: block;
	border-bottom: 1px solid #ddd;
	color: #066;
	padding-top: 5px;
	padding-right: 1px;
	padding-bottom: 5px;
	padding-left: 1px;
}
div.nav_boxdiv a.current {
	background : #ccc;
}
div.nav_boxdiv a:hover {
	background : #066 url('linkarrow.gif') no-repeat right center;
	color: #fff;
	text-decoration: none;
}
div.nav_boxdiv.sidebarbl {
	margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
	padding-left:20px;
	padding-top:2px;
	background-color: #FFF;
}
div.nav_boxdiv.sidebarlgt {
	font: normal 12px Tahoma, Geneva, sans-serif;
	color: #000;
	
	margin: 5px 2px 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
	height:auto;
	border: 2px solid #008;
	padding: 1px;
	line-height: 10px; /*link text is indented 8px*/
	text-decoration: none;
	background-color: #FFF;
}
div.nav_boxdiv.sidebarcaf{
	font: Georgia, "Times New Roman", Times, serif;
	color: #006;
	padding: 0px;
	line-height: 17px; /*link text is indented 8px*/
	text-decoration: none;
	bordercolor:#000099;
	border-style:dashed;
	background-color:#71b0e0;
	
}
div.nav_boxdiv.sidebarjk {
	color: #006;
	padding: 0px;
	line-height: 17px; /*link text is indented 8px*/
	text-decoration: none;
	background: #FF9 url('note_middle.gif') repeat-y center bottom;
	}
	
	/* Ends Left Navigation Area */
	
    #my_menu {
		float: left;
		width: 206px;
		font-family: Arial, Helvetica, sans-serif;
		font-size: 10px;
		margin: 1px 0px 0px 0px;
		padding: 0px;
		background-color: #4A6E90;
	}
    .image_left {
		float: left;
	}
	.image_right {
		float: inherit;
		clear: none;
	}
	.image_center {
		float: none;
		clear: both;
	}
    #content2 {
	clear: both;
	background-color: #4A6E90;
	background-image: url('logowatermark3.jpg');
}
    .content_left {
		float: left;
		width: 48%;
	}
	.content_right {
		float: right;
		width: 48%;
	}
    .style2 {
		color: #000080;
		font-size: 24px;
		font-weight: bold;
		text-align: center;
	}
	.style5 {
		color: #DF7401;
		font-size: 14px;
		font-weight: bold;
		text-align: center;
	}

    </style>
    
    <script type="text/javascript" src="scripts/sdmenu.js">
    </script>
    
    <script type="text/javascript">
	// <![CDATA[
	var myMenu;
	window.onload = function() {
		myMenu = new SDMenu("my_menu");
		myMenu.init();
	};
	// ]]>
	</script>	
	
    
	<asp:ContentPlaceHolder id="head" runat="server">
	</asp:ContentPlaceHolder>
</head>
<body>
    
<div id="container">


	<div id="banner" >
	<div class="col_left">
        <a href="http://calvinnew/default.aspx">
 <img src="jcmhlogo.gif" width="85" height="56" hspace="1" vspace="7" 
            align="middle" style="border-width: 0px"/></a>
 <!--end div_col_left -->
</div>
	<div class="col_middle">
   <div class="mid_left">
    Calvin
    <!--end div_mid_left -->
   </div>
   <div class="mid_right">
   <h3>Jackson County Memorial Hospital</h3>
  <h4>"This is my hospital"</h4>
  <!--end div_mid_right -->
  </div>
  <!--end div_col_middle -->
</div>
<div class="col_right"  >
		  
&nbsp;<form method="get" action="http://calvinnew/search.aspx"> 
<table cellpadding="0px" cellspacing="0px"> 
<tr> 
<td style="border-style:solid none solid solid;border-color:#4B7B9F;border-width:1px;">
<input type="text" name="zoom_query" style="width:100px; border:0px solid; height:17px; padding:0px 3px; position:relative;"> 
</td>
<td style="border-style:solid;border-color:#4B7B9F;border-width:1px;"> 
<input type="submit" value="" style="border-style: none; background: url('images/searchbutton3.gif') no-repeat; width: 24px; height: 20px;">
</td></tr><tr>
<td>Search Calvin Here</td>
</tr>
</table>
</form> 
<!--end div_col_right -->
</div>
	
<!--end banner -->	
	</div>

<div id="main">
<div id="nav_box" style="z-index: 1;  top: 120px; left: 0px">
<div>
      	<table border="0" cellPadding="0" cellSpacing="0" dir="ltr" width="100%">
			<tr>
				<td vAlign="top" width="24"></td>
				<td vAlign="top">
				<table border="0" cellPadding="0" cellSpacing="0" dir="ltr" width="100%">
					<tr>
						<td vAlign="top" width="1%">
						<p align="center">
						<img alt="IT TaskPlus Survey" height="74" longDesc="Surveys" src="http://calvin/Graphics/survey.jpg" width="103" align="middle"/>
						<br />
						<span class="style2"><a href="Surveys/survey.asp">IT 
						Survey</a></span></p><p></p>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		  </table>
      </div>
	<div  id="my_menu" class="sdmenu" style="margin-top: 0px">
      
      
      <div class="collapsed">
        <span>JCMH Documents</span>
        <a href="Departmental_Pages/Human_Resources/JCMH_2008-2009_Organizational_Goals.doc" >JCMH Organizational Goals</a>
		<a href="Departmental_Pages/Human_Resources/Standards_of_Performance.doc" >JCMH Standards of Performance</a>
		<a href="Departmental_Pages/Human_Resources/Operating_Principles.doc" >JCMH Operating Principals</a>
</div>
      
      <div class="collapsed">
        <span style="height: auto">Emergency Operations</span>
        <a href="file:///G:/Intranet/Emergency_Planning/Disaster Call List.xls">Disaster Call List</a>
<a href="file:///G:/Intranet/Emergency_Planning/Table_of_Contents-EOP.doc">JCMH Emergency Operations Plan</a>
<a href="file:///G:/Intranet/Emergency_Planning/JCMH_Operations_Level_Certification_Report.doc" >Operation Level Certification Employee's</a>
<li><a href="file:///G:/Intranet/Emergency_Operations.htm#HMTL">Hazardous Materials Training Links</a>

<a href="Departmental_Pages/Safety_and_Security/HAZWOPPER/index.htm" >Hazwoper for First Receivers Training Courses</a>
<div class="collapsed">
	<span>FEMA Independent Study</span>
<a href="Emergency_Planning/Self_Help_Guide-_Accessing_FEMA_Independent_Study_Program.doc" >Self Help Guide - Accessing FEMA Independent Study Program</a>
<a href="http://training.fema.gov/IS/crslist.asp">FEMA Independent Study Program</a>
<a href="http://www.training.fema.gov/emiweb/IS/is100HC.asp">HC-100</a>
<a href="http://www.training.fema.gov/EMIWeb/IS/examnotice.asp?eid=is100hc" >IS-100.HC Final Exam</a>
<a href="http://www.training.fema.gov/emiweb/IS/is200HC.asp">HC-200</a>
<a href="http://www.training.fema.gov/EMIWeb/IS/examnotice.asp?eid=is200hc" >IS-200.HC Final Exam</a>
<a href="http://training.fema.gov/EMIWeb/IS/is700a.asp">IS-700a</a>
<a href="http://training.fema.gov/EMIWeb/IS/examnotice.asp?eid=is700a" >IS-700a.Final Exam</a>
<a href="http://training.fema.gov/EMIWeb/IS/IS800b.asp">IS-800b</a>
<a href="http://training.fema.gov/EMIWeb/IS/examnotice.asp?eid=is800b" >IS-800.b Final Exam</a>
</div>
</div>
<div class="collapsed">
        <span>Communication</span>
       <a href="/Telephone_Lists/Employee List.htm#EList" >JCMH Phone List by Employee</a>
        <a href="/Telephone_Lists/Dept Phone List.htm#DList" >JCMH Phone List by Department</a>
        <a href="/Departmental_Pages/Physicians_Services/Medical_Staff/Physician_Phone_List.pdf" >Physicians</a>
        
        
      <a href="https://www.donotcall.gov/default.aspx" >National Do Not Call Directory</a>
	<a href="cell_phone_discounts.aspx" >JCMH Cell Phone Discounts</a>
              <div class="collapsed">
        <span>Cisco Telephone Guides</span>
        <a href="http://callmanager.jcmh.local/ccmuser">Call Manager</a>
  <a href="Call_Manager_Reference_Guide.aspx">Call Manager Training Guide</a>
  <a href="Technology_Training/CiscoUNITY/Cisco_Bytes_Presentation.htm">Phone & Unity Messaging Overview Presentation</a>
  <a href="Cisco_Unity_Quick_Reference_Basics_WithVoiceMail.aspx">Phone & Unity Messaging Quick Reference Guide - Basic w/ Voice Mail</a>
  <a href="Cisco_Unity_Quick_Reference_Limited_NoVoiceMail.doc.aspx">Phone & Unity Messaging Quick Reference Guide - Limited w/o Voice Mail</a>
  <a href="">Phone & Unity Messaging Quick Reference Guide - Advanced - coming soon</a>
  <a href="Cisco_Quick_Reference_Wallet_Guide.aspx">Cisco Quick Reference Wallet Guide</a>
  <a href="http://www.cisco.com/comm/applications/CCNP/qlm/7961/index.htm">Cisco Automated Phone Tutorial</a>
      </div>
	<div class="collapsed">
        <span>Printable Phone Lists</span>
        <a href="Policies_and_Procedures/Telephone_Lists/Dept_List-Legal.snp">Legal Size Sorted by Dept</a>
        <a href="Policies_and_Procedures/Telephone_Lists/Dept_List_-_Letter.snp">Letter Size Sorted by Dept</a>
 		<a href="Policies_and_Procedures/Telephone_Lists/Phone_Book_by_Individual.snp">Letter Size Alphabetical Phone Book</a>
  		<a href=file:///G:/Intranet/Telephone%20Lists/Admin%20Phone%20List/Admin%20Dept%20List-Legal.snp>Legal Size Administrative Phone List</a>
  		<a href="file:///G:/Intranet/Telephone%20Lists/Admin%20Phone%20List/Admin%20Dept%20List-Letter.snp">Letter Size 	Administrative Phone List</a>
  		<a href="http://calvin/Policies%20and%20Procedures/Telephone%20Lists/Dept%20List%2011x17.snp">11 x 17 Size Sorted by Dept</a>
      	</div>
  
        
      </div>
      <div class="collapsed">
        
        <span style="height: 12px">News & Notes</span>
        <a href="news_notes.aspx">News & Notes about JCMH</a>
        <a href="Departmental_Pages/Public_Relations_Marketing/Monitor.pdf">The Monitor</a>
        <a href="Departmental_Pages/Public_Relations_Marketing/Current_Patient_Satisfaction_Report.pdf">Patient Satisfaction Report - Press Ganey</a>
        
        
      </div>
      <div class="collapsed">
      <span>Forms</span>
      <a href="forms.aspx">JCMH Forms</a>
      </div>
        <div class="collapsed">
        <span>Policies and Procedures</span>
       <a href="/policies_and_procedures/" >JCMH's Policies and Procedures</a>
        </div>
        <div class="collapsed">
        <span>Departmenal Pages</span>
        <a href="/departmental_pages/" >JCMH</a>
       
        </div>
        <div class="collapsed">
        <span>Employee Education</span>
        <a href="Employee_Education.htm" >JCMH</a>
        </div>
        <div class="collapsed">
        <span>Patient Care Education</span>
        <a href="Patient_Care_Education.htm" >JCMH Patient Care Links</a>
        <a href="http://online.lexi.com/" >Lexicomp Drug & Patient Information</a>
        </div>
        <div class="collapsed">
        <span>SEM</span>
        <a href="http://apps.sgasp.com/SEMJacksonCounty/site1/loginpage.aspx" target="_blank">JCMH</a>
        </div>
        <div class="collapsed">
        <span>IT Training Guides</span>
       <a href="it_training.htm" >JCMH IT Training Guides</a>
        </div>
        <div class="collapsed">
        <span>Physicians Services</span>
        <a href="Policies_and_Procedures/Physician_Services/Physician_Services_TOC.doc" >JCMH Physician's Services</a>
        </div>
        <div class="collapsed">
        <span>PACS</span>
        <a href="https://pacs.jcmh.com" target="_blank">JCMH PACS</a>
        </div>
        <div class="collapsed">
        <span>Meeting Room Manager</span>
        <a href="http://meetingman/mrm7" >JCMH</a>
        </div>
        <div class="collapsed">
        <span>Net Learning</span>
        <a href="http://si.netlearning.us/jcmh/" target="_blank">JCMH Net Learning</a>
        </div>
        <div class="collapsed">
        <span>Joint Commission</span>
        <a href="https://www.verge-solutions.com/vstandard/default.aspx" >Joint Commission</a>
        </div>
        <div class="collapsed">
        <span>External Links</span>
        <a href="External_Web_Sites.htm" >Links to External Websites</a>
        </div>
    </div>
    <ul class="sidebarlt" style="text-align:center">

<img src="arrow_left.gif" alt="Back" onclick="goHist(-1)" width="12" height="12" />&nbsp;&nbsp;
| &nbsp;&nbsp;
<img src="home_swirl.gif" alt="Home" onClick="window.location='../'" height="20" />&nbsp;&nbsp;
| &nbsp;&nbsp;
<img src="arrow_right.gif" onclick="goHist(1)" width="12" height="12"/>
  </ul>
  <p></p>
<p class="sidebarbl " >
  <a href="http://www.okprosperity.com/oklahoma" title="Oklahoma Prosperity Project" target="_blank">
  <img src="OKProsperitylogo.jpg" name="OKProsperity" frameborder=0 title="Oklahoma Prosperity Project " id="OKProsperity" scrolling="no"  marginheight="0" marginwidth="0" width="134" height="125">
  </a>
</p>
      
          
	
	<!-- end nav_box -->
		</div>	

	
	
		<asp:ContentPlaceHolder id="main" runat="Server">
	
	<div id="content1">
	
	
	<!--end content -->
	</div>
	
		</asp:ContentPlaceHolder>
	<asp:ContentPlaceHolder runat="Server" id="content2">
	<div id="content2" class="clear"></div>

	</asp:ContentPlaceHolder>
	<!--end main -->
	</div>
	
	
<!--end container -->
</div>    
</body>
</html>

Open in new window

LVL 1
GolfgentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun KlineLead Software EngineerCommented:
The ASP:ContentPlaceHolder tag on a master page only works with .Net pages that have the the ASP:Content tag. When a .Net page with the ASP:Content tag on it loads, it merges the content page and the master page into one overall ASPX page. The controls inside the ASP:Content tag basically replaces the ASP:ContentPlaceHolder tag. This is not the same as the HTML IFrame, which is the concept you appear to be thinking, where you load separate web pages into the IFrame.
0
GolfgentAuthor Commented:
Shaun,

So what are my options then?
0
GolfgentAuthor Commented:
I tried to add the code to the content area, however because the file is in a virtual directory and included vb script I had to many errors and I didn't have a clue where to start.
<HTML>

<head>
<link rel="stylesheet" media="all" type="text/css" href="css/BasicStyle.css" />
<link href="BasicStyle.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> JCMH Departmental Pages</title>
<style type="text/css">
 

.menu {padding:0 0 0 30px; margin:0; list-style:none; height:30px; background:#339999 url(/menu_0.gif);}
.menu li {float:left;}
.menu li a {display:block; float:left; height:30px; line-height:30px; background:url(/menu_0.gif); color:#ddd; text-decoration:none; font-family:arial, verdana, sans-serif; text-align:center; padding:0 0 0 30px; cursor:pointer; font-size:11px;}
.menu li a b {float:left; display:block; background:url(/graphics/menu_0.gif) right top; padding:0 30px 0 5px;}
.menu li.current a {color:#fff; background:url(/menu_2.gif);}
.menu li.current a b {background:url(/menu_2.gif) no-repeat right top;}
.menu li a:hover {color:#fff; background: url(/graphics/menu_1.gif);}
.menu li a:hover b {background:url(/graphics/menu_1.gif) no-repeat right top;}
.menu li.current a:hover {color:#fff; background: url(/graphics/menu_2.gif); cursor:default;}
.menu li.current a:hover b {background:url(/graphics/menu_2.gif) no-repeat right top;}
.menu li a em {display:block; float:left; width:16px; height:30px;}
.menu li a em.home {background:url(/graphics/home2.gif) no-repeat center center;}
.menu li a em.pp {background:url(/graphics/sem_user.gif) no-repeat center center;}
.menu li a em.dept {background:url(/graphics/clock.gif) no-repeat center center;}
.menu li a em.forms {background:url(/graphics/forms.gif) no-repeat center center;}
.menu li a em.schedule {background:url(/graphics/schedule.gif) no-repeat center center;}
.menu li a em.learn {background:url(/graphics/learn.gif) no-repeat center center;}
.menu li a em.mrm {background:url(/graphics/calendar_add.gif) no-repeat center center;}
.menu li a em.pacs {background:url(/graphics/amicas.gif) no-repeat center center;}
 
 
</style>
<title>JCMH Departmental Pages</title>



<%
 
' ***** Configurable options
' Which file extensions to allow separated by commas ie: "," Set to "" or "all" to allow all extensions
' note: Unless proper permissions are set, files that are not allowed will still be viewable if a user 
' inputs the exact web location of the file. The method used here will only remove the link to the file.
AllowExt = ""
'AllowExt = "doc, pdf, htm, html"
' DenyExt overrides AllowExt
DenyExt = "gif, asp, jpg, jpeg, ico, txt, ini, exe, css, xml, png"
 
' Top navigation separator
Const sChevron = ">"     ' "/Departmental_Pages/"
 
 
' Always display the navigation path? 
Const bShowPath = True     'False
' Always display the root directory? 
Const bShowRoot = False     'True
 
' Page font tag
Const sFont = "<font face=""Verdana, Arial, Helvetica""  size=""3"" COLOR=""#000088"">"
' Column header font tag
Const sColFont = "<font face=""Verdana, Arial, Helvetica"" size=""3"" COLOR=""#F0F8FF"">"
' Column header color
Const TblHeader = "#5F9F9F" 
 
' Directory grid alternating colors
Const FileRow1 = "#7AC5CD"  
Const FileRow2 = "#E0FFFF"  
Const FolderRow1 = "#B0C4DE"    
Const FolderRow2 = "#CAE1FF"    
 
' Color chart
'#000088    'NavyBlue1			'sFont
'#FFFFFF    'White				'sColFont
'#5F9F9F"   'CadetBlue			'Table Text,TblHeader 
'#7AC5CD"   'CadetBlue3			'FileRow1
'#ADD8E6"   'LightBlue			'FileRow2
'#B0C4DE"   'LightSteelBlue		'FolderRow1
'#CAE1FF"   'LightSteelBlue1	'FolderRow2
'#880088    'Fuchia1			'VLINK
'#C1CDCD    'Azure3				'Table BGRD
'#00009C    'New Midnight Blue	'Link
'F0F0F0	    'Grey94				'Table bgcolor for Navigation Bar
 
 
 
' ***** Begin Script
Dim sError
On Error Resume Next
sDirectory = Trim(sDirectory)
If Right(sDirectory,1) <> "/Departmental_Pages/" Then sDirectory = sDirectory & "/Departmental_Pages/" 
 
' ***** Get subfolder from passed querystring
sDir = sDirectory & Request.QueryString("dir")
sDir = Trim(sDir)
If Right(sDir,1) <> "/" Then sDir = sDir & "/"
 
' ***** Important! Make sure the subfolder path is in the shared folder. This keeps 
' users from browsing directories outside of the shared. ie: dir=../
' You may want to include some logging code if this happens, here we just
' put the user back into the default directory.
sFolder = Server.MapPath( sDir )
sDirFolder = Server.MapPath( sDirectory )
sSubFolder = Right(sDir,Len(sDir)-Len(sDirectory))
If InStr( sFolder , sDirFolder ) = 0 Then 
sFolder = sDirFolder
sSubFolder = ""
sError = sError & " Path not authorized;"
End If
 
 
' ***** Load the file system and navigate to our shared folder.
Set objFileObject = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFileObject.GetFolder( sFolder )
 
' ***** Missing or misspelled folder path.
If IsEmpty( objFolder ) Then 
 
sFolder = sDirFolder
sSubFolder = ""
sDir = sDirectory 
Set objFolder = objFileObject.GetFolder( sFolder )
sError = sError & " Folder not found;"
End If
 
%>
</head>



 
<BODY BGCOLOR="#FFFFFF" Text="#000088" LINK="#00009C" VLINK="#880088">

<TABLE width="98%" BORDER=0 bgcolor="#CDCDCD" CELLPADDING=0 CELLSPACING=2>




<% ' ***** Feel free to edit the above table tag
 
' ***** Build path navigation
aNames = Split( sSubFolder , "/")
If bShowPath Then
If UBound( aNames ) > 0 Or bShowRoot Then %>
<TR BGCOLOR="#E6E6FA">
<TD><%= sFont %> </font></TD>
<TD COLSPAN="4"><%= sFont %>
<B>  <A HREF="<%= Request.ServerVariables("SCRIPT_NAME") %>"><%= Left(sDirectory,len(sDirectory)-1) %></A></B>
<% End If
 
For count = 0 To UBound( aNames ) -1 
aURL = aURL & aNames(count) & "/"
%> <%= sChevron %> <B><A HREF="<%= Request.ServerVariables("SCRIPT_NAME") %>?dir=<%= Server.URLEncode( aURL ) %>"><%= aNames(count) %></A></B><%
Next %></font><span class="MessageHeader">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JCMH Departmental Pages </span></TD></TR><% 
End If 
 
For count = 0 To UBound( aNames ) -2
aDirUp = aDirUp & aNames(count) & "/"
Next %>
 
<TR BGCOLOR="<%= TblHeader %>" ALIGN=LEFT>

<TD BGCOLOR="#ffffff"><A HREF="<%= Request.ServerVariables("SCRIPT_NAME") %>?dir=<%= Server.URLEncode( aDirUp ) %>"><font face="Wingdings" COLOR="<%= TblHeader %>">
Ç</font></a></TD>
<TD width="60%"><%= sColFont %>  <B>Filename:</B>  </FONT></TD>
<TD WIDTH="15%"><%= sColFont %>  <B>File Type:</B>  </FONT></TD>
<TD WIDTH="25%"><%= sColFont %>  <B>Date Last Modified:</B>  </FONT></TD>
<%
' ***** Iterate through the subfolders in our shared folder.
For Each objFile In objFolder.SubFolders 
bHideThisItem = False
If objFile.Attributes AND 2 Then
    bHideThisItem = True
End If
if NOT bHideThisItem then
    ' ***** Alternate between these two row colors.
    If iAlternate = 0 Then 
        Response.Write "<TR BGCOLOR=""" & FolderRow1 & """>" 
        iAlternate = 1
    Else 
        Response.Write "<TR BGCOLOR=""" & FolderRow2 & """>"
        iAlternate = 0 
    End If
 
' ***** Display folder with link to navigate
%> <TD align="center" BGCOLOR="<%= TblHeader %>"><font face="Wingdings" COLOR="#ffffff">
0</font></TD>
<TD><%= sFont %>  <A HREF="<%= Request.ServerVariables("SCRIPT_NAME") %>?dir=<%= Server.URLEncode( sSubFolder & objFile.Name )%>"><%= objFile.Name %></A>  </font></TD>
 
<TD><%= sFont %>  <%= objFile.Type %>  </font></TD>
<TD><%= sFont %>  <%= FormatDateTime(objFile.DateLastModified,2) %>  </font></TD>
</TR>
<%
end if
' ***** Next Folder
Next
 
' ***** Iterate through the files in our shared folder / subfolder.
For Each objFile In objFolder.Files
  
bHideThisItem = False
If objFile.Attributes AND 2 Then
    bHideThisItem = True
End If
if NOT bHideThisItem then
    sFileName = objFile.name
    if InStr(sFileName,".") > 0 then
        sShortFileName = Left(sFileName,InStrRev(sFileName,".")-1)
    else
        sShortFileName = sFileName
    end if
    ' ***** Only continue if it's a valid extension
    If ( IsValidFile (sFileName) ) Then 
         
        ' ***** Alternate between these two row colors.
        ' We'll use the same counter variable to continue alternating between 
        ' the light / dark shade according to the previous folder row color.
        If iAlternate = 0 Then 
            Response.Write "<TR BGCOLOR=""" & FileRow1 & """>" 
            iAlternate = 1
        Else 
            Response.Write "<TR BGCOLOR=""" & FileRow2 & """>"
            iAlternate = 0 
        End If
        ' ***** Display file with link to execute / download.
%> <TD align="center" BGCOLOR="<%= TblHeader %>"><font face="Wingdings" COLOR="#ffffff">
&lt;</font></TD>
<TD><%= sFont %>  <A HREF="<%= sDir %><%= sFileName %>"><%= sShortFileName %></A>  </font></TD>
 
<TD><%= sFont %>  <%= objFile.Type %>  </font></TD>
<TD><%= sFont %>  <%= FormatDateTime(objFile.DateLastModified,2) %>  </font></TD>
</TR><%
    End If
end if
 
' ***** Next File
Next 
 
' ***** Clean up those nasty memory leaks
Set objFileObject = Nothing
Set objFolder = Nothing
 
' ***** Iterate through and approve extensions
Function IsValidFile(FileName)
    strFileExt = Right( FileName , Len( FileName ) - InStrRev( FileName , "." ) )
    If Not AllowExt <> "" Or LCase( AllowExt ) = "all" Then
        IsValidFile = True
    Else
        aAllowExt = Split( AllowExt & "," , ",")
        IsValidFile = False
        For iCnt = 0 To UBound( aAllowExt ) -1
            If strFileExt = Trim(aAllowExt( iCnt )) Then IsValidFile = True
        Next
    End If
    select case strFileExt
        case "gif", "jpg", "jpeg", "ico", "png", "wmf", "txt", "xml", "ini", "js", "css", "exe" 
            IsValidFile = False
    end select
    select case FileName
        case "default.asp", "Auxilliary","Case_Management","Centralized_Scheduling","Clinical_Counseling","Dialysis","Employee_Clinic","Environmental_Services","Home_Care_Hospice","Hospitalist","ICU_CCU","Converting from_to_Meditech_files","Main_Street_Family_Medical_Center","Mangum_Clinic","Orthopedic_Clinic","Outreach_Clinic","Pediatric_Clinic","Plant_Operations","Respiratory_Therapy","Same_Day_Surgery","Senior_Perspective","Skilled_Nursing_Facility","Southwest_Orthopedics","Surgical_and_Urology","Tamarack","Womens_Health_Associates", "vti_cnf", "getdirectory.asp" 
            IsValidFile = False
    end select
End Function 
 
 
' ***** Did we encounter an Error?
If Err <> 0 Or sError <> "" Then
Response.Write "<TR><TD bgcolor=""#ffffff"" colspan=""5""><font face=""Verdana, Arial, Helvetica"" color=""red"" size=""1"">ERROR: " & sError & Space(1) & "ASP: " & Err.description & ";</font></TD></TR>"
End If
 
 
%>
</TABLE>
<TABLE align="center"> 

<div align="center" style="width: 750px;">
&nbsp;
	
  <center>
<ul class="menu">
<li><a target=_top href="../"><em class="home"></em><b>Home</b></a></li>
<li><a target=_top href="./"><em class="home"></em><b>Technology Training</b></a></li>
<li><a target=_self href="/policies_and_procedures/getdirectory.asp?dir="><em class="pp"></em><b>P & P Directory</b></a></li>
<li><a target=_self href="/departmental%20Pages.htm"><em class="dept"></em><b>Departmental Pages</b></a></li>
</ul>
  
  
  </center>

	
</div>
</TABLE>


</BODY></HTML>

Open in new window

0
Shaun KlineLead Software EngineerCommented:
I'm guessing that you are doing a phased upgrade of your intranet site from HTML/Classic ASP to ASP.Net. The best option I can give you is to place an HTML IFrame control inside the ASP:Content tag. (Or, you can use a FRAME control.) Then change any links you have on your master page to update the src attribute of the IFrame. This option will only work for the HTML and classic ASP pages. The Word and PDF documents may display in the user's browser, but this can be overridden.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GolfgentAuthor Commented:
Shaun,

I took your advice using iframes and it works perfectly for my needs, thanks.  Here is the code that I used:

<%@ Page language="VB" masterpagefile="Main_Page.master" title="Calvin" %>
<asp:Content id="Content1" runat="server" contentplaceholderid="main">

      
      
      
      
      <iframe src="Departmental_Pages/default.asp?dir=Physicians%5FServices" margin-top="5px" margin-left="215px" margin-bottom="15px" width="790px%" height="800px"> </iframe>


</asp:Content>
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.