Web application does not receive ASP namespace reference

I have a code that I inherited from a provider, which only dumped them SVN to the inetpub folder, and I wanted to pull the files into our source control as a web file application in visual studio 2008.

The project was originally a website project, and I am trying to convert it into a web application project.

However, the compiler complains that the ASP namespace is not referenced. Since this namespace is dynamically created, how do I get around this?

UPDATE: Sorry for leaving so long, but I thought this image would be context:

alt text http://img638.imageshack.us/img638/8431/asp.png

+3
source share
1 answer

You mean that you get errors when trying to request pages in the browser, saying that you can’t find such things?

In this case, make sure that in your web.config in the block <system.web>you have something like:

<pages>
  <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" 
         assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add tagPrefix="asp" namespace="System.Web.UI.WebControls"
         assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  </controls>
</pages>

This is very similar to the fact that another provider pushed these settings further into the .config stack (say, in the framework web.config, as was done in ASP.NET 4)

0
source

Source: https://habr.com/ru/post/1750496/


All Articles