change the code as following ---- Since Default is a keyword in c#
Page1:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="page.aspx.cs" Inherits=_Default" %>
Page2:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="page.aspx.cs" Inherits="_Default" %>
page.aspx.cs:
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
page.aspx.cs will be as the file Code Behind for Page1 and Page2.