2 Replies Latest reply on Oct 31, 2006 1:22 PM by Mattgyver

    DW8 is Killing My .Net code - WTF?

    Arghhhhh!!!
      So I just upgraded to DW8 and it's now killing code at will on my .Net pages - any page with .aspx extension.

      Basically I open a page that was fine in MX2004, and when I do all my .Net related code is simply missing! It caused problems in MX2004 originally, but I was able to tell it not to rewrite code for .aspx pages and it stopped the problem. I tried to do the same with DW8, but it removes code anyway. Heck, I simply pasted a table from one page into another and all it did was paste in a big empty space where the code should have been! WTF? This is a major flaw. Can anyone tell me how to prevent this from happening?

      Below is a sample of what DW8 is doing. If anyone has any idea what to do about this, PLEASE let me know. I'm hoping that this is simply an issue of me being new to DW8, and not knowing how to adjust its behavior. However, I fear that it's an issue of DW8 simply being a piece of crap.

        • 1. Re: DW8 is Killing My .Net code - WTF?
          Level 7
          I took your correct code and tried to duplicate your problem on my machine
          with in an ASP.net site (I used ASP.net VB for my page and site) and I can't
          duplicate the problem. Saved the page .. tested it on the testing server
          and DW8 does not rewrite the code and create table tags. Closed and
          reopened the page a few times and the code is still intact.

          I am assuming you have .aspx included in the list of extensions under
          Edit/Preferences/Code Rewriting, never rewrite code for: .. correct?


          --
          Nancy Gill
          Adobe Community Expert
          BLOG: http://www.dmxwishes.com/blog.asp
          Author: Dreamweaver 8 e-book for the DMX Zone
          Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
          Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
          Guide, Mastering Macromedia Contribute
          Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development


          "Arghhhhh!!!" <webforumsuser@macromedia.com> wrote in message
          news:e8f03b$5ga$1@forums.macromedia.com...
          > So I just upgraded to DW8 and it's now killing code at will on my .Net
          > pages -
          > any page with .aspx extension.
          >
          > Basically I open a page that was fine in MX2004, and when I do all my .Net
          > related code is simply missing! It caused problems in MX2004 originally,
          > but I
          > was able to tell it not to rewrite code for .aspx pages and it stopped the
          > problem. I tried to do the same with DW8, but it removes code anyway.
          > Heck, I
          > simply pasted a table from one page into another and all it did was paste
          > in a
          > big empty space where the code should have been! WTF? This is a major
          > flaw.
          > Can anyone tell me how to prevent this from happening?
          >
          > Below is a sample of what DW8 is doing. If anyone has any idea what to do
          > about this, PLEASE let me know. I'm hoping that this is simply an issue
          > of me
          > being new to DW8, and not knowing how to adjust its behavior. However, I
          > fear
          > that it's an issue of DW8 simply being a piece of crap.
          >
          >
          >
          > -------------------------------------------------------------------
          > Here's how it should should look:
          >
          > <asp:DataGrid id="dgUnits" runat="server" BorderStyle="None"
          > AutoGenerateColumns="False" BorderWidth="0" Width="100%" DataSource='<%#
          > Site.GetUnits() %>'>
          > <Columns>
          > <asp:TemplateColumn>
          > <HeaderTemplate>
          > <span class="style17">Unit Name </span>
          > </HeaderTemplate>
          > <ItemTemplate>
          > <span class="style19">
          > <%# Container.DataItem("descript") %>
          > </span>
          > </ItemTemplate>
          > </asp:TemplateColumn>
          > <asp:TemplateColumn>
          > <ItemStyle HorizontalAlign="Left"></ItemStyle>
          > <HeaderTemplate>
          > <span class="style17"> Sq. Foot </span>
          > </HeaderTemplate>
          > <ItemTemplate>
          > <%# FormatNumber(Container.DataItem("sq_foot"), 0) %>
          > </ItemTemplate>
          > </asp:TemplateColumn>
          > <asp:TemplateColumn>
          > <ItemStyle HorizontalAlign="Left"></ItemStyle>
          > <HeaderTemplate>
          > <span class="style17"> Price </span>
          > </HeaderTemplate>
          > <ItemTemplate>
          > <%# FormatCurrency(Container.DataItem("low_price"), 0) %>
          > -
          > <%# FormatCurrency(Container.DataItem("high_price"), 0) %>
          > </ItemTemplate>
          > </asp:TemplateColumn>
          > </Columns>
          > </asp:DataGrid>
          >
          > -------------------------------------------------------------------
          >
          >
          > -------------------------------------------------------------------
          > And below is how DW8 decides to "clean it up" (notice it even creates a
          > table,
          > where it should be a DataGrid):
          >
          >
          > <table cellspacing="0" rules="all" border="0" id="dgUnits"
          > style="border-width:0px;border-style:None;width:100%;border-collapse:collapse;">
          > <tr>
          > <td>
          > <span class="style17">Unit Name </span>
          > </td><td>
          > <span class="style17"> # Bedrooms </span>
          > </td><td>
          > <span class="style17"> # Bathrooms </span>
          > </td><td>
          > <span class="style17"> Price </span>
          > </td>
          > </tr><tr>
          > <td>
          > <span class="style19">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > -
          >
          > </span>
          > </td>
          > </tr><tr>
          > <td>
          > <span class="style19">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > -
          >
          > </span>
          > </td>
          > </tr><tr>
          > <td>
          > <span class="style19">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > -
          >
          > </span>
          > </td>
          > </tr><tr>
          > <td>
          > <span class="style19">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > -
          >
          > </span>
          > </td>
          > </tr><tr>
          > <td>
          > <span class="style19">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > </span>
          > </td><td align="Left">
          > <span class="SqFtPrice">
          >
          > -
          >
          > </span>
          > </td>
          > </tr>
          > </table>
          > -------------------------------------------------------------------
          >


          • 2. Re: DW8 is Killing My .Net code - WTF?
            Mattgyver
            Myself and 2 other developers in the office are having similar issues with Dreamweaver re-writing code. Whenever we use User Controls (shared files / include files / whatever you want to call them), Dreamweaver, when viewing the file in Design mode or Code/Design split mode, will actually take the content of the include file and write it into the code - overwriting the user control tag. It does this seemingly without creating an undo state, so if you are not paying close attention it will sneak up and get you.

            So this: <nav:footer id="footer" runat="server" /> gets turned into the contents of the actual shared file.

            What a pain. Anyone else know how to fix this? We even have the code rewriting turned off and it should not be touching anything related to .net (aspx, ascx, and so on)