Question

why doesn't visual studio 2012 indent this properly when I do Edit->Advanced->Format Document

                    <div class="col-md-4 col-lg-5 search-bar-wrap">
    <div class="navbar-form navbar-search" role="search">
                        <asp:Panel ID="pnlMediaSearch" runat="server" >
                            <div id="divMediaSearch" runat="server">
                                <uc:UCMiniSearchBar ID="ucMiniSearch" runat="server" />
                            </div>
                        </asp:Panel>
             </div>
                    </div>

things I have tried setting it to spaces rather than tabs. adding the following to web.config

 <pages>
    <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </controls>
</pages>
Was it helpful?

Solution

I don't have this problem anymore and it was a combination of 2 things

  1. upgrading to the latest and greatest Service Pack.
  2. Making sure there are no user controls that call other user controls in the same folder/namespace.

once I move the user controls to a different name space it stops having problems and manages to do indenting properly. I am sorry I can't figure out where I found this tidbit. but thank you to the person who put it out there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top