惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
L
LangChain Blog
GbyAI
GbyAI
F
Fortinet All Blogs
腾讯CDC
Last Week in AI
Last Week in AI
A
About on SuperTechFans
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
B
Blog
D
Docker
G
Google Developers Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
U
Unit 42
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed

博客园 - AGPSky

资源文件配置和使用 操作App.config与Web.config文件 正则表达式30分钟入门教程(第二版) C#命名规则、开发习惯和风格 Linq to SQL 安装VS2005 SP1时失败(错误 1718。文件被数字签名策略拒绝) gridview 增加行,进行数据汇总 - AGPSky - 博客园 利用DAAB 获取存储过程返回值的方法 - AGPSky - 博客园 【转】理解委托与事件的好文章 【转】C#委托,事件理解入门 (译稿) 【转】C# 中的委托和事件 【转】浅析C#的事件处理和自定义事件[object sender , EventArgs e] [转】object sender,EventArgs e的一些讲解 js的prototype的例子三 js的prototype的例子二 js的prototype的例子一 把控件动态添加到页面中 petshop4.0网上资料 Webdiyer的分页控件+通用存储过程+查询+ajax分页
vs2005和vs2008默认建立web site和web application 生成的web...
AGPSky · 2008-01-07 · via 博客园 - AGPSky

如果建立的是web site
那么
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
CodeFile="Default.aspx.cs"
Inherits 这里只有类名,原因是.cs文件里面默认没有名称空间

如果建立的是web application
那么

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
CodeBehind="Default.aspx.cs"
Inherits="WebApplication1._Default" 这里就有名称空间

namespace WebApplication1
{
    
public partial class _Default : System.Web.UI.Page
    
{
        
protected void Page_Load(object sender, EventArgs e)
        
{

        }

    }

}

最主要的区别就是codebehind和codefile。不知道原因是什么。