views:

20

answers:

2

Hello all,

I am running Visual Studio 2008. I cannot get the auto format to work on the source code of my aspx page. I have tried it from the edit menu and the ctrl K, D. Nothing works. If I manually fix everything, the next time I open the file the formatting is gone. Here is a sample of what it looks like:

<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2" CssClass="ajax__myTab" Width="100%" ScrollBars="Horizontal">
    <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Work - Main" Enabled="true">
        <headertemplate>
            Main
        </headertemplate>
        <contenttemplate>
            <table cellpadding="3" cellspacing="1">
                <tr>
                    <td style="text-align: right">
                        Escalated Inquiry ID:
                    </td>
                    <td>
                        <asp:Label ID="lblPkey" runat="server"></asp:Label>
                    </td>
+1  A: 

I have seen this when there is a problem with the HTML. If there is an error in syntax (missing a closing tag, for instance), then the parser doesn't know where the tabs should go.

EDIT

Based on your sample (assuming you pasted everything)

<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2" CssClass="ajax__myTab" Width="100%" ScrollBars="Horizontal">
    <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Work - Main" Enabled="true">
        <headertemplate>
            Main
        </headertemplate>
        <contenttemplate>
            <table cellpadding="3" cellspacing="1">
                <tr>
                    <td style="text-align: right">
                        Escalated Inquiry ID:
                    </td>
                    <td>
                        <asp:Label ID="lblPkey" runat="server"></asp:Label>
                    </td>

, here is what is missing:

                </tr>
            </table>
        </contenttemplate>
    </cc1:TabPanel>
</cc1:TabContainer>
Gabriel McAdams
Any idea on how to find it. I just pasted the page into dreamweaver and it did not find a missing tag.
Mike
I just provided part of the page as an example of what the formatting looked like
Mike
+1  A: 

take a look at this post. Also, make sure you don't have any missing closing tags.

Kamyar
I see the problem. I am using AJAX and none of the tags are listed in the HTML editor. Thank you for the help.
Mike
@Mike No problem. glad you could work it out.
Kamyar