Goals:

Steps:

  1. Create a new project - Visual C# / Web / ASP.NET Web Application.
    There is also possibility to create a 'Web Site' (menu File / New / Web Site), but the 'Web Application' should be preferred. The Web Site has no project file. The lack of a project file can make the application's configuration much harder (sometimes even impossible)
  2. Take a look into the generated project.
  3. Add text to the Default page:
  4. Run the project (Ctrl+F5 or menu Debug / Start Without Debugging). Note the following actions:
  5. Modify in Visual Studio the text displayed on the page and save the file. Do not compile the project, just refresh the page in the browser. Note that the text has changed. ASP.NET automatically checks for changes in source code files and, when there is such need, recompiles the project.
  6. Add a new Web Form to the project (right click on the project in the Solution Explorer window: Add / New Item / Web Form). Name it Info.aspx:
  7. Add to the Default.aspx page options that will allow to move to the Info.aspx page (currently, the only option is manual modification of the address displayed in the browser). There are a few ways to do it:
  8. Test some of web pages' events:
  9. The source code of the web application can be debugged. It concerns both the C# and JavaScript code. The support for debugging is not limited to the Internet Explorer browser.
    To debug the application just press F5 button in Visual Studio. If it is the first try of debugging, a message appears:

    Note that (as mentioned in the message) enabling debugging should be disabled before deploying the application to the production server.
  10. Apart from the page's and its controls' events, there are also application's events available. There are only a few of application's events, but some of them can be extremely useful.

[Source code]