How to add REGION in Visual Studio to aspx files

I am using asp.net with the code behind and C #.

So, I have two files for each .aspx page in VS 2010.

In the .aspx.cs page, I can add regions to my code using:

#region Name Region
#endregion

My questions:

  • How to do this in an .aspx file? #region only works in a .cs file.
  • Do you know any other useful tag to help me better organize the code for the .aspx and .cs file?
  • Do you know keyboard shortcuts to expand or collapse my entire region in my code?

Thank you for your help.

+5
source share
4 answers

Do you know keyboard shortcuts to expand or collapse my entire region in my code?

Here are some key chords for you.

Ctrl-M Ctrl-O ( ).

Ctrl-M Ctrl-M , .

Ctrl-M Ctrl-L .

, javascript: - , Ctrl-M Ctrl-H, , +- . Ctrl-M Ctrl-O, .

. , , VS .

+8

Visual Studio aspx , HTML.

"-" , HTML- (Div ..) .

+4

- .
< asp: Literal id =" JavaScriptRegion "runat =" server" >
.... javascripts .
</: >

, "Javasript". asp ctrols , -

< div style = "" > ....

0

, :

  • CTRL + M, CTRL + O
  • CTRL + M, CTRL + M
  • CTRL + M, CTRL + L
  • CTRL + M, CTRL + T

.., .

0
source

All Articles