Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Folding #region?

    Hi all,

    I'm developing a website in Visual Web Developer 2010 Express, C#, and my files are becomming pretty large now. I figured I would just create some #regions and collapse them. I have a .cs file, and a .ashx file, and somehow there is a difference, because I am able to collapse regions and functions in the .cs file, but not in the .ashx file, the + and - signs on the left are not showing. It's probably some configuration option, but I can't seem to find it. Anybody have any ideas?

  • #2
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    After some searching I've found the solution. The problem is that the .ashx file and the .cs file are opened in a different editor. You can add a filetype to the options to have the .ashx file opened in the editor of the .cs file, but that would give errors on the first line of the .ashx.

    My own solution is to have the code in a seperate .cs file. This is not possible with a .ashx file, but I've created a class in the AppCode folder, and extended my .ashx to that class

    I've added a bit more extensive comment to where I found the solution, here


  •  

    Tags for this Thread

    Posting Permissions

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