我新建了个cs文件。。它也默认放在App_Code文件夹下。。
然后我在simpleCodeBehind.aspx中调用 时,提示只能用一个Page。如果有把第一句删了,还是会出错不允许App_Code/CodeBe.cs这样连接,如果用Src="CodeBe.cs"会提示找不到该文件,而且会出现很多错误,大部份是说这句的字符太多 
<%@ Page Language="C#" AutoEventWireup="false" CodeFile="simpleCodeBehind.aspx.cs" Inherits="simpleCodeBehind" %>
<%@ Page Inherits="myCodeBehind" Src="~/App_Code/CodeBe.cs" %>
-----------------------------------
codebe.cs代码如下。
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public class myCodeBehind
{
    public Label lblShowName;
    public TextBox tbxName;
 
    public void btnSumbit_Click(object sender, EventArgs e)
    {
        lblShowName.Text = "Hello: " + tbxName.Text;
    }
}

----------------------
simpleCodeBehind.aspx代码如下。。
%@ Page Language="C#" AutoEventWireup="false" CodeFile="simpleCodeBehind.aspx.cs" Inherits="simpleCodeBehind" %>
<%@ Page Inherits="myCodeBehind" Src="~/App_Code/CodeBe.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="tbxName" runat="server"></asp:TextBox>
        <asp:Button ID="btnSumbit" runat="server" Text="Click Me" OnClick="btnSumbit_Click" /></div>
        <asp:Label ID="lblShowName" runat="server" />
    </form>
</body>
</html>
环境:XP VS2005 ..资料是在ASP.NET 1.0入门经典-C#编辑篇上看到的。
--------------另外,大家有没asp.net2.0的电子书下载地址啊。。。