It was my understanding that Dreamweaver would leave alone any code outside of the < html > tag However, whenever I update my template, the ASP.net declarations in the pages based on the template are removed by Dreamweaver. This means my pages lose the "link"
to their code-behind files. Which is BAD!
The weird thing is, that if I remove for example the "@" from the declaration (therefore making it an incorrect declaration) then DW leaves the code on the page. What this means is that DW only has problems with ASP.net declarations. Its quite happy to leave
any other text or code.
Then DW wont edit it. If you have vs 2005, I would highly recommend you use master pages... although you cant really nest those too effectively. DW templates leave a lot to be desired...
Insert this code <%--'comment--%> after your <%@ Page Language="VB" AutoEventWireup="true" CodeFile="extended-trip-travel-insurance.aspx.vb" Inherits="travel_insurance_extended_trip_travel_insurance" %>
gilkesy
Participant
760 Points
152 Posts
Dreamweaver templates and ASP.net 2
Jan 06, 2006 07:16 PM|LINK
I'm using Dreamweaver to create the layout and manage my ASP.net 2 site. However, all "code-behind" is done in Visual Studio 2005
On my ASP.net pages I need to have a different declaration at the top of each page, e.g.:
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="annual-travel-insurance.aspx.v<div id="intelliTxt" style="padding-left: 5px; padding-right: 5px;">
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="extended-trip-travel-insurance
It was my understanding that Dreamweaver would leave alone any code outside of the < html > tag However, whenever I update my template, the ASP.net declarations in the pages based on the template are removed by Dreamweaver. This means my pages lose the "link" to their code-behind files. Which is BAD!
The weird thing is, that if I remove for example the "@" from the declaration (therefore making it an incorrect declaration) then DW leaves the code on the page. What this means is that DW only has problems with ASP.net declarations. Its quite happy to leave any other text or code.
What can I do?</div>
therookie14
Member
225 Points
43 Posts
Re: Dreamweaver templates and ASP.net 2
Jan 10, 2006 04:21 PM|LINK
add this simple script at the end of the ASP.NET code on top of your child pages:
<script runat="server">
</script>
ex:
<%@ Register TagPrefix="uc1" TagName="_BreadCrumbs" Src="_BreadCrumbs.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="../Default.aspx.vb" Inherits="company.websitename.Web.DefaultPage"%>
<%@ Register TagPrefix="uc2" TagName="Header" Src="_Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Menu" Src="_Menu.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>websitename- Home</title>
<script runat="server">
</script>
Then DW wont edit it. If you have vs 2005, I would highly recommend you use master pages... although you cant really nest those too effectively. DW templates leave a lot to be desired...
hope i helped!
rooban
Member
16 Points
3 Posts
Re: Dreamweaver templates and ASP.net 2
Aug 31, 2007 07:20 AM|LINK
Insert this code <%--'comment--%> after your <%@ Page Language="VB" AutoEventWireup="true" CodeFile="extended-trip-travel-insurance.aspx.vb" Inherits="travel_insurance_extended_trip_travel_insurance" %>
like this
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="extended-trip-travel-insurance.aspx.vb" Inherits="travel_insurance_extended_trip_travel_insurance" %>
<%--'comment--%>
insert <%--'comment--%> code inside your template page as well
like this
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="utf-8" %>
<%--'comment--%>
it will work fine
Regards,
Rooban
Web & Graphic Designer
www.inboxdesigns.com
Scott Pulliam
Member
2 Points
1 Post
Re: Dreamweaver templates and ASP.net 2
Sep 14, 2007 04:41 AM|LINK
This worked like a charm.
But, why did it work???
TIA,
Scott
Scott P
rooban
Member
16 Points
3 Posts
Re: Dreamweaver templates and ASP.net 2
Sep 14, 2007 05:21 AM|LINK
Thats how its works if you are using dreamweaver and .net,
otherwise you have to go with fully .net compatible software such as expression web
its working with master pages
Rooban
www.inboxdesigns.com
Web & Graphic Designer
www.inboxdesigns.com