Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
Every .aspx page starts with a Page directive. This Page directive specifies the language for the page,and it also tells ASP.NET where to find the associated code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileName.aspx.cs" Inherits="FileName"%>
Notice that Visual Studio uses a slightly unusual naming syntax for the source code file. It hasthe full name of the corresponding web page, complete with the .aspx extension, followed by the .csextension at the end.