简体   繁体   中英

default namespace in web.config (web application project)

I had a website project, which I converted to a web application project. I have a set of namespaces defined in my web.config pages/namespaces section. However I am not able to see them in my codebehind (.vb) files. This used to work fine in the web site project. Can somebody put light on this please?

Thanks,

You can add them to the .vbproj file for that web application project. They appear to have no effect from the web.config file. There are a number of "Import" nodes in the .vbproj file. You will have to format them a little differenty see below:

<add namespace="System.Web.UI.HtmlControls"/>

to

<Import Include="System.Web.UI.HtmlControls" />

我想,您必须在每个文件中手动分配名称空间。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM