前台HTML,javascript,后台C#




代码能不在后台写,就不在后台写
- WebSite和WebApplication的区别
1)当改变后台代码时,WebApplication需重启浏览器或者重新生成解决方案,而WebSite则不用;
2)WebSite没有Solution,没有namespace,不利于工程化开发。
新建webapplication(新建项目)和website(新建网站)的区别:
1.修改C#后台代码以后,application需要重新开启网站,才能看到变化,website则可以直接刷新页面就行
2.website代码框架里面没有namespace




WebApplication(Web应用程序)和WebSite(网站)的区别,
- WebSite是为了兼容从ASP转过来的开发人员的习惯而存在的,用起来简单,比如不需要创建命名空间、CS代码修改以后不需要重启就能看到变化(无论是WebSite还是WebApplication,修改aspx都不需要重启。
- WebApplication每次修改以后点击【生成解决方案】也能立即看到修改效果),但是不利于工程化开发,比如代码出错不容易发现,代码不分命名空间。开发技术上没有任何区别,只是开发、调试习惯不同而已。
website每一个cs文件都会编译成一个dll文件
webapplication整个应用文件只会生成一个dll文件
Webapplication做大网站,大项目
website做小网站