use .dwt template in Visual Studio 2005/2008 or convert it to .master template

Intranet web site is created in Expression web with .dwt template using (there are two .dwt templates one for home page and other for regular pages), all pages are .aspx files. Now I want to change development software to Visual Studio 2005/2008 but I want to continue using same template from Expression Web (.dwt). Is it possible to convert .dwt template to .master file and keep all functionalities, or somehow import it to visual studio and then be able to create new pages with this template.
LVL 1
kahvedzicAsked:
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.

ApexCoCommented:
Open the dwt in the editor and then click file > Save as and name the file xxxx.master.

After you've saved it as a master you'll need to add asp ContentPlaceHolders to replace the dwt editable areas. There'll also need to be a an overall <form></form> 'container' for the page content in the new masterpage

If you compare the saved result with a new blank masterpage you can see where to place them.
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
kahvedzicAuthor Commented:
I did first part of your suggestion and have attached code (this was .dwt file and now is .master). I dont know where to put ContentPlaceHolders, can you help me to make this .master file actually work. Thanks.
0
kahvedzicAuthor Commented:
Sorry, forgot to attach, this is my .dwt template saved as .master. Where do I have to add ContentPlaceHolders to make it work as .dwt worked? Thanks

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Master language="VB" %>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<!-- #BeginEditable "doctitle" -->
<title></title>
<!-- #EndEditable -->
<link href="styles/style2.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.style1 {
	text-align: left;
}
a {
	color: #000000;
}
a:hover {
	color: #999999;
}
.style4 {
	color: #DCDCDC;
}
.style5 {
	color: #000000;
	font-family: Verdana;
	font-size: medium;
}
.style7 {
	color: #000000;
	font-family: Verdana;
}
.style8 {
	font-size: 10pt;
}
.style9 {
	color: #000000;
	font-weight: 700;
}
</style>
</head>

<body style="background-color: #DCDCDC">

<form id="form1" runat="server">

<!-- Begin Container -->
<div id="container" style="width: 1063px; height: 711px; font-family: Verdana;" class="style4">
	<!-- Begin Masthead -->
	<div id="masthead" class="style1" style="width: 980px; height: 150px; background-color: #FFFFFF;">
		<table style="width: 100%">
			<tr>
				<td>
				<img height="48" src="images/hd_icon.jpg" width="90" /><br />
				<span class="style9">033 287 666<br />
				033 287 777<br />
				033 287 888<br />
				<br />
				<br />
				</span></td>
				<td>
				<img height="145" src="images/nervozni_banner.jpg" width="750" />&nbsp;</td>
			</tr>
		</table>
		</div>
	<!-- End Masthead -->
	<!-- Begin Navigation -->
	<div id="navigation">
		<ul style="height: 398px">
			<li><a href="Default.aspx" class="style8">Home</a></li>
			<li><a class="style8" href="page.aspx">Link</a></li>
			<li><a href="page.aspx" class="style8">Link</a></li>
			<li><a href="page.aspx" class="style8">Link</a></li>
			<li><a href="page.aspx" class="style8">Link</a></li>
            <li><a href="page.aspx" class="style8" >Link</a></li>
			<li><a href="page.aspx" class="style8">Link</a></li>
			<li id="li1">__________________</li>
			<li><a class="style8" href="page.aspx">Link</a></li>
			<li><a class="style8" href="page.aspx">Link</a></li>
			<li><a class="style8" href="page.aspx">Link</a></li>
		</ul>
	</div>
	<div id="content" style="left: 0px; top: 0px; width: 800px">
		<!-- #BeginEditable "content" -->
		<h2 class="style5">Heading 2</h2>
		<p class="style7">insert content here</p>
		<!-- #EndEditable "content" --></div>
	<!-- End Navigation -->
	<!-- Begin Content -->
	<!-- End Content -->
	<!-- Begin Footer -->
	<div id="footer" style="margin: auto auto auto 159px; width: 821px">
		<p style="width: 810px; height: 16px;">
		<a href="Default.aspx" class="style13">Home</a><font size="2"> | 
		</font> 
		<a href="page.aspx" class="style13">Link</a><font size="2"> |
		</font>
		<a class="style13" href="page.aspx">Link</a><font size="2"> | 
		</font> 
		<a class="style13" href="page.aspx">Link</a><font size="2"> | 
		</font> 
		<a href="page.aspx" class="style13">Link</a><font size="2"> |
		</font>
		<a href="page.aspx" class="style13">Link</a><font size="2"> | 
		</font> 
		<a href="page.aspx" class="style13">Link</a><font size="2"> |
		</font>
		<a href="page.aspx" class="style13">Link</a></p>
	</div>
	<!-- End Footer --></div>
<!-- End Container -->

</form>

</body>

</html>

Open in new window

0
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

kahvedzicAuthor Commented:
Can you please help me solve this, now it is very urgent problem for me
0
kahvedzicAuthor Commented:
I still did not manage to create usable master page from .dwt template. Some help anyone?
0
kahvedzicAuthor Commented:
Finally I did it, add content placeholder where I want to add content on pages attached on masterpage.
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
.NET Programming

From novice to tech pro — start learning today.