Dreamweaver template code rearranged by Studio.NETvisual designer

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Dreamweaver template code rearranged by Studio.NETvisual designer

    I have used Dreamweaver MX2004 to create a C# ASP.NET website. I used the
    template functionality to give me consistant page design. My problem is if I
    edit those pages visually in Studio.NET, Studio rearranges the tags. Studio
    stacks the three tags <HTML><HEAD> and <TITLE> back to back and moves the
    dreamweaver template tags after the title tags. Since these are comments I am
    sure Studio thinks it has no effect, but after saving the Studio Edited pages
    and attempting to modify (and push the changes to the pages based on that
    template), you get mismatched tag errors. I have become fairly good at
    rearranging these tags (with an outside editor since dreamweaver locks template
    regions) and sometimes resort to removing the template and reapplying the
    template. But THERE HAS TO BE A BETTER WAY. Richard McCrea Thanks in advance
    for your help

    RichMcCrea Guest

  2. Similar Questions and Discussions

    1. Can't View Item Template in Designer Viewer
      Hi, I creted a usercontrol which has an ITemplate in it named ItemTemplate. I am using ASP 2.0. When I drag the user control on to my .aspx...
    2. rearranged dreamweaver code fix
      There is an annoying problem where Visual Studio rearranges Dreamweaver template markers (which are really just comments so VS should ignore them). ...
    3. Control Render Method Problem and the Visual Studio Designer
      Hello List, I have a web control library that has both Render and OnPreRender methods. My problem is that when I drag and drop my control onto the...
    4. Displaying template content in vs.net designer
      hi, I'm trying to display the content within my "templated databound custom controls" templates at design time, in the vs.net designer. I'm able to...
    5. Subclassing UserControl makes the Visual Studio designer does not work
      I want to subclass the System.Web.UI.UserControl to make a common control for my site. Then, when I create a new UserControl from the Visual Studio...
  3. #2

    Default Re: Dreamweaver template code rearranged by Studio.NET visual designer

    Yes. Same thing happens if you view page in IE (and supposedly Netscape)
    and then "Save As..".

    Better way? Use DW if you need to edit visually. :)

    Hope this helps,
    Randy



    RichMcCrea wrote:
    > I have used Dreamweaver MX2004 to create a C# ASP.NET website. I used the
    > template functionality to give me consistant page design. My problem is if I
    > edit those pages visually in Studio.NET, Studio rearranges the tags. Studio
    > stacks the three tags <HTML><HEAD> and <TITLE> back to back and moves the
    > dreamweaver template tags after the title tags. Since these are comments I am
    > sure Studio thinks it has no effect, but after saving the Studio Edited pages
    > and attempting to modify (and push the changes to the pages based on that
    > template), you get mismatched tag errors. I have become fairly good at
    > rearranging these tags (with an outside editor since dreamweaver locks template
    > regions) and sometimes resort to removing the template and reapplying the
    > template. But THERE HAS TO BE A BETTER WAY. Richard McCrea Thanks in advance
    > for your help
    >
    Randy Edmunds Guest

  4. #3

    Default Re: Dreamweaver template code rearranged by Studio.NETvisual designer

    Randy. I know MS is bad for rearranging tags which (because they are
    comments) should not matter where they are. I usually right click my aspx page
    in studio and say view code (avoiding the visual editor) for this reason. But,
    I thought maybe there was maybe a way I could arrange my tags in my template
    pages so they wouldn't be subject to studio's bad reorganizing. the template
    page begins... <%@ Page Language='C#' ContentType='text/html'
    ResponseEncoding='iso-8859-1' %> <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01
    Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'> <html> <head> <meta
    http-equiv='Content-Type' content='text/html; charset=iso-8859-1'> <!--
    TemplateBeginEditable name='doctitle' --> <title>Untitled Document</title> <!--
    TemplateEndEditable --> and the pages based on this document end up like...
    <%@ Register TagPrefix='MM' Namespace='DreamweaverCtrls'
    Assembly='DreamweaverCtrls,version=1.0.0.0,publicK eyToken=836f606ede05d46a,cultu
    re=neutral' %> <%@ Page Language='c#' ContentType='text/html'
    ResponseEncoding='iso-8859-1' CodeBehind='index.aspx.cs'
    AutoEventWireup='false' Inherits='ufportal.index' %> <!DOCTYPE HTML PUBLIC
    '-//W3C//DTD HTML 4.01 Transitional//EN'
    'http://www.w3.org/TR/html4/loose.dtd'> <html><!-- InstanceBegin
    template='/Templates/uftemp1.dwt.aspx' codeOutsideHTMLIsLocked='false' -->
    <head> <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
    <!-- InstanceBeginEditable name='doctitle' --> <title>Main Menu</title> <!--
    InstanceEndEditable --> as you probably know, after visual editing (which is
    sometimes necessary in our environment) it becomes <HTML><HEAD><TITLE> (then
    the template comments) I could live without the metadata tag, but I cannot
    control where MM puts the <!-- InstanceBegin
    template='/Templates/uftemp1.dwt.aspx' codeOutsideHTMLIsLocked='false' --> tag.
    The title tag wrapper is a nuisance as well, since after studio it no longer
    wraps the <TITLE> tags. Microsoft is definately the bad guy for rearrangeing
    code it doesn't need to, but could Macromedia's template update routine be more
    forgiving and fix what the bad guy breaks. I know 'If wishes were horses,
    dreamers would ride'. Whisper into one of those wonderful ears there at
    macromedia for me. Rich McCrea

    RichMcCrea Guest

  5. #4

    Default Re: Dreamweaver template code rearranged by Studio.NET visual designer

    > Whisper into one of those wonderful ears there at
    > macromedia for me.
    Your lips into their ears -

    [url]http://www.macromedia.com/support/email/wishform/[/url]

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "RichMcCrea" <webforumsuser@macromedia.com> wrote in message
    news:cv60q1$n5t$1@forums.macromedia.com...
    > Randy. I know MS is bad for rearranging tags which (because they are
    > comments) should not matter where they are. I usually right click my aspx
    > page
    > in studio and say view code (avoiding the visual editor) for this reason.
    > But,
    > I thought maybe there was maybe a way I could arrange my tags in my
    > template
    > pages so they wouldn't be subject to studio's bad reorganizing. the
    > template
    > page begins... <%@ Page Language='C#' ContentType='text/html'
    > ResponseEncoding='iso-8859-1' %> <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
    > 4.01
    > Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'> <html> <head>
    > <meta
    > http-equiv='Content-Type' content='text/html; charset=iso-8859-1'> <!--
    > TemplateBeginEditable name='doctitle' --> <title>Untitled Document</title>
    > <!--
    > TemplateEndEditable --> and the pages based on this document end up
    > like...
    > <%@ Register TagPrefix='MM' Namespace='DreamweaverCtrls'
    > Assembly='DreamweaverCtrls,version=1.0.0.0,publicK eyToken=836f606ede05d46a,cultu
    > re=neutral' %> <%@ Page Language='c#' ContentType='text/html'
    > ResponseEncoding='iso-8859-1' CodeBehind='index.aspx.cs'
    > AutoEventWireup='false' Inherits='ufportal.index' %> <!DOCTYPE HTML PUBLIC
    > '-//W3C//DTD HTML 4.01 Transitional//EN'
    > 'http://www.w3.org/TR/html4/loose.dtd'> <html><!-- InstanceBegin
    > template='/Templates/uftemp1.dwt.aspx' codeOutsideHTMLIsLocked='false' -->
    > <head> <meta http-equiv='Content-Type' content='text/html;
    > charset=iso-8859-1'>
    > <!-- InstanceBeginEditable name='doctitle' --> <title>Main Menu</title>
    > <!--
    > InstanceEndEditable --> as you probably know, after visual editing (which
    > is
    > sometimes necessary in our environment) it becomes <HTML><HEAD><TITLE>
    > (then
    > the template comments) I could live without the metadata tag, but I
    > cannot
    > control where MM puts the <!-- InstanceBegin
    > template='/Templates/uftemp1.dwt.aspx' codeOutsideHTMLIsLocked='false' -->
    > tag.
    > The title tag wrapper is a nuisance as well, since after studio it no
    > longer
    > wraps the <TITLE> tags. Microsoft is definately the bad guy for
    > rearrangeing
    > code it doesn't need to, but could Macromedia's template update routine be
    > more
    > forgiving and fix what the bad guy breaks. I know 'If wishes were horses,
    > dreamers would ride'. Whisper into one of those wonderful ears there at
    > macromedia for me. Rich McCrea
    >

    Murray *TMM* Guest

  6. #5

    Default Re: Dreamweaver template code rearranged by Studio.NET visual designer

    I played around with this a bit and I think I have a workaround.

    If you move the "InstanceBegin" and "InstanceEnd" markers outside of the
    <html> and </html> tags, respectively, then both VS.Net and DW seem to
    behave nicely. I did not test IE, but I assume it uses the same logic.

    Note I only did a test of updating a simple Template -- this needs
    testing of all Template features such as nested Templates.

    Unfortunately, current you will need to update all (current and future)
    pages created from a Template manually using a tool other than DW! I
    have not found any way to update the Template itself automate this.

    Also, DW marks the <html> tag as invalid, but it does not seem to break
    anything!

    Hope this helps,
    Randy



    RichMcCrea wrote:
    > I thought maybe there was maybe a way I could arrange my tags in my template
    > pages so they wouldn't be subject to studio's bad reorganizing.
    Randy Edmunds Guest

  7. #6

    Default Re: Dreamweaver template code rearranged by Studio.NET visual designer

    It sounds scary to me, Randy....

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "Randy Edmunds" <randy_nospam@macromedia.com> wrote in message
    news:421B7144.2070707@macromedia.com...
    >I played around with this a bit and I think I have a workaround.
    >
    > If you move the "InstanceBegin" and "InstanceEnd" markers outside of the
    > <html> and </html> tags, respectively, then both VS.Net and DW seem to
    > behave nicely. I did not test IE, but I assume it uses the same logic.
    >
    > Note I only did a test of updating a simple Template -- this needs testing
    > of all Template features such as nested Templates.
    >
    > Unfortunately, current you will need to update all (current and future)
    > pages created from a Template manually using a tool other than DW! I have
    > not found any way to update the Template itself automate this.
    >
    > Also, DW marks the <html> tag as invalid, but it does not seem to break
    > anything!
    >
    > Hope this helps,
    > Randy
    >
    >
    >
    > RichMcCrea wrote:
    >> I thought maybe there was maybe a way I could arrange my tags in my
    >> template pages so they wouldn't be subject to studio's bad reorganizing.
    >

    Murray *TMM* Guest

  8. #7

    Default Re: Dreamweaver template code rearranged by Studio.NETvisual designer

    Eeeeekkks... I tried that.. When editing the template.. DW re-adds the
    template tags where it thinks they belong... <!-- InstanceBegin
    template='/Templates/uftemp1.dwt.aspx' codeOutsideHTMLIsLocked='false' -->
    <html><!-- InstanceBegin template='/Templates/uftemp1.dwt.aspx'
    codeOutsideHTMLIsLocked='false' --> <head> and then re-editing in studio
    causes... <HTML> <HEAD> <title>My Recent Time</title> <meta
    http-equiv='Content-Type' content='text/html; charset=iso-8859-1'> <!--
    InstanceBegin template='/Templates/uftemp1.dwt.aspx'
    codeOutsideHTMLIsLocked='false' --> <!-- InstanceBegin
    template='/Templates/uftemp1.dwt.aspx' codeOutsideHTMLIsLocked='false' -->
    <!-- InstanceBeginEditable name='doctitle' --> <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name='head' --> doubling up the templates in the
    same place again. I appears that unapplying the template and reapplying (after
    ripping out the stuff added by the template) is the best method. I have gotten
    good at rearranging them in my external editor. Sigh.

    RichMcCrea Guest

  9. #8

    Default Re: Dreamweaver template code rearranged by Studio.NET visual designer

    OK. Thanks for trying. It was a long shot, but that one has been bugging
    me for some time, so I thought I'd mention it.

    Thanks,
    Randy

    > Eeeeekkks... I tried that.. When editing the template.. DW re-adds the
    > template tags where it thinks they belong...
    Randy Edmunds Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139