The Code Editor window is where you can edit the artifacts and source code in your project. In this lesson we focus on how you can edit a web page in your project.
Multiple tabs (watch video)
Each file that you open using the Solution Explorer creates a new Tab in the Code Editor. The tabs at the top of the Code Editor allow you to flip back and forth between several files open at once. Each tab contains the file name so that you can distinguish between files.
Design view versus Source view for ASP.NET web pages (watch video)
When you are editing an ASP.NET web page in the Code Editor, you can switch back and forth between a few different views. The first is the Design view which shows you what the web page will look like when the web application runs in the browser. This is a visually oriented view where the developer drags items onto the view and then edits the properties of various objects on the web page. Another view of a web page is the Source view which shows you the raw HTML code for the web page. To switch between the Design view and Source view, you can click the corresponding selection at the bottom of the Code Editor. There is also a third view called Split that is a combination of the two other views and can sometimes be useful.
Editing the .aspx web page versus the .cs code behind file (watch video)
If you remember from earlier in the lessons we mentioned that an ASP.NET web page is actually separated into two distinct files: the .aspx file which is the visual presentation of the web page and the .cs file which is the C# source code of the web page. When you are working on a web page, you will work with both of these files. If you want to change how the web page looks or add new controls onto the web page, you will edit the .aspx file. If you need to change the source code or actions that the web page performs, you will edit the .cs file. Watch the video as I switch back and forth between the two.