ASP.NEt 4.0问题

扫码查看
本文介绍了ASP.NEt 4.0问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

0)创建班级时,不会自动为我创建App_Code文件夹.

1)我编写了一个从System.Web.UI.Page继承的BasePage类.当我输入时,intellisense不会像我以前那样改变Page的颜色(但是也没有带下划线来表示错误).

2)当我尝试在网站的其他地方使用BasePage类时,它表示当我尝试在浏览器中查看页面时找不到它.

这是因为我在做一个Web应用程序而不是一个网站吗?如果是这样,我该如何解决?我曾尝试将基本页面类移至根站点文件夹,但这根本无济于事.

编辑==============

我还忘了提到,当我创建基本页面类时,必须在文件顶部添加using System.Web.UI;,但要添加intellisense.

另外(这是个大问题),我创建了一个新的网站(与Web应用程序相对),而我上面描述的所有问题都消失了.为什么会有所不同?

0) When I create a class, the App_Code folder isn''t automagically created for me.

1) I''ve written a BasePage class that inherits from System.Web.UI.Page. When I type that out, intellisense doesn''t change the color of Page like I''m used to (but it''s not underlinedeither to indicate an error).

2) When I try to use the BasePage class elsewhere in the site, it says it can''t find it when I try to view a page in the browser.

Is this all happening because I''m doing a web app versus a web site? If so, how can I fix it? I''ve tried moving the base page class to the root site folder, and that didn''t help at all.

EDIT ==============

I also forgot to mention that when I created the base page classes, I had to add using System.Web.UI; to the tops of the files, but intellisense.

Also (and this is the big one) I created a new web site (as opposed to a web app), and all of the problems I described above disappeared. Why does it make a difference?

推荐答案



<compilation debug="false">
    <codeSubDirectories>
        <add directoryName="VBCode" />
        <add directoryName="CSCode" />
    </codeSubDirectories>
</compilation>



在此处查找更多信息 [ ^ ]

只是一个想法:-D

亲切的,您真心地
Espen Harlinn



Look here for more info[^]

It''s just a thought :-D

Graciously, yours truly,
Espen Harlinn


这篇关于ASP.NEt 4.0问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-29 01:27
查看更多