开发者

The type or namespace name 'UI' cannot be found for using System.Web.UI

I am following the tut here http://msdn.microsoft.com/en-us/library/h59db326.aspx

#

Create an App_Code directory directly under the root directory of your Web site (also called Web application root). #

C开发者_开发技巧opy the source file for the control (WelcomeLabel.cs or WelcomeLabel.vb) to the App_Code directory.

But I got the error on

using System.Web.UI;
using System.Web.UI.WebControl;

I have tried to add System.Web as Reference but that still doesn't resolve the stuff. I can't see System.Web.UI and System.Web.UI.WebControl in the reference lists is this normal ?

Thanks.


What you can do is check if the System.Web reference is in your references folder. This can be done by looking into the references folder inside your project. (Projectname**References**)

The reference System.Web has to be there. Note: If it's not inside the reference folder, then you have to add it. (Right mouseclick on the References folder, select Add Reference..., tab .Net and select System.Web)

Now you can use all the namespaces of System.Web.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜