How to outlining or collapse a aspx page code?

Last post 05-10-2009 6:21 AM by Kulrom. 3 replies.

Sort Posts:

  • How to outlining or collapse a aspx page code?

    05-10-2009, 1:55 AM
    • Participant
      1,560 point Participant
    • mycwcgr
    • Member since 08-07-2005, 8:47 AM
    • Posts 750

    I know I can use  #region InitialControlsByUIType ... #endregion code outlining or collapse a .cs files code

    Could you tell me how can outlining or collapse a aspx page, such as the following code? thanks!


    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
       
        </div>
        </form>
    </body>
    </html>

  • Re: How to outlining or collapse a aspx page code?

    05-10-2009, 3:10 AM
    • Contributor
      2,268 point Contributor
    • Kulrom
    • Member since 01-08-2009, 1:17 PM
    • Republic of Macedonia
    • Posts 413

    all the elements (tags) that have a closing/matching tag are collapsable by default.

    just notice the minus sign near say html or any other tags that have been properly terminated and click it.

    now you should see only

    +<html>...</html>

     

    When you ask a question, remember to click "Mark As Answer" when you get a reply which answers your question.
    My Site: ASP.NET Source Code


    My Blog: My New VB.NET Blog
  • Re: How to outlining or collapse a aspx page code?

    05-10-2009, 5:37 AM
    • Participant
      1,560 point Participant
    • mycwcgr
    • Member since 08-07-2005, 8:47 AM
    • Posts 750

    Thanks! 

    I know  all the elements (tags) that have a closing/matching tag are collapsable by default, but somtimes it stop collapse automatically when you reload you aspx

    In .cs files,  the system will never stop collapse automatically when you use #region  ... #endregion

    BTW, +<html>...</html> is not good!

  • Re: How to outlining or collapse a aspx page code?

    05-10-2009, 6:21 AM
    Answer
    • Contributor
      2,268 point Contributor
    • Kulrom
    • Member since 01-08-2009, 1:17 PM
    • Republic of Macedonia
    • Posts 413

    well i know that it is not what you want but that's all you can do.

    Btw, i am also aware that sometimes it even hides the collapse/expand pointers.

    But, usually when you reload the page it shows up them again.

    Means, to answer your question,  VS (design view) doesn't support Regions. Unfortunatelly.

    When you ask a question, remember to click "Mark As Answer" when you get a reply which answers your question.
    My Site: ASP.NET Source Code


    My Blog: My New VB.NET Blog
Page 1 of 1 (4 items)