Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 27th, 2004, 10:13 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 146
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aadz5
Default Inheriting from System.Web.UI

Dear All,

I am having trouble creating my own class which inherits from System.Web.UI.Page

This is the error Iget: -

"The type or name 'UI' does not exist in the does not exist in the class or namespace System.Web Are you missing an assembly reference)"

Any ideas

Thanks

Adz - The World is not enough
__________________
Adz - Learning The J2EE Ways.
 
Old March 27th, 2004, 11:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Never seen that before... did you happen to have any problems with installing the .NET framework?
 
Old March 28th, 2004, 12:52 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Are you inheriting from System.Web.UI or System.Web.UI.Page? There is a conflict between your topic subject and the message. System.Web.UI is a namespace and you can not inherit from it. You must inherit from a class (Page).

This is a problem with Visual Studio when you start creating your own page classes (beyond just the single web form page class that the ASPX inherits at runtime). When you build a web form in visual studio, the ASPX file has an inherits statement which maps to a class that is defined in the page's code behind. This code behind class is inherited from System.Web.UI.Page. I have found that when one of the page classes is derived from an intermediate class visual studio has a problem recognizing that the class *eventually* was derived from System.Web.UI.Page. This won't cause any problems when you build and run the code, but it just makes VS a pain. It won't let you view the page in the designer and you'll get that warning.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Web.UI.Control.Controls Collection Ihoulun ASP.NET 1.0 and 1.1 Basics 0 October 17th, 2006 07:51 AM
Mobile Control in System.Web.UI.Page hpfarstad ASP.NET 2.0 Professional 0 August 28th, 2006 05:00 AM
No System.Web.UI alexanderH BOOK: ASP.NET Website Programming Problem-Design-Solution 2 March 10th, 2005 03:04 AM
namespace System.Web.UI henninga BOOK: ASP.NET Website Programming Problem-Design-Solution 9 November 16th, 2004 03:51 PM
Subclassing system.web.ui.page gazeth BOOK: ASP.NET Website Programming Problem-Design-Solution 2 May 25th, 2004 10:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.