Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
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 January 22nd, 2005, 03:01 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default Custom Server Control --- URGENT HELP needed plz

Hi Friends

I am trying to create a simple custom server control, but while compiling and creating DLL, I am getting the error below. Please help, its urgent:

Code for the class file:

Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Namespace manu

    Public Class test
        Inherits Control
        Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
            writer.Write("<INPUT style='Z-INDEX: 101; LEFT: 520px; POSITION: absolute; TOP: 272px' type='text' value='test'>")
        End Sub

    End Class
End Namespace

Error while compliling:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\Documents and Settings\machinename>cd C:\Inetpub\wwwroot\vipin\try1

C:\Inetpub\wwwroot\vipin\try1>vbc /t:library test.vb
Microsoft (R) Visual Basic .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.00.3705.288
Copyright (C) Microsoft Corporation 1987-2001. All rights reserved.

C:\Inetpub\wwwroot\vipin\try1\test.vb(6) : error BC30466: Namespace or type 'UI'
 for the Imports 'System.Web.UI' cannot be found.

Imports System.Web.UI
        ~~~~~~~~~~~~~
C:\Inetpub\wwwroot\vipin\try1\test.vb(7) : error BC30466: Namespace or type 'Web
Controls' for the Imports 'System.Web.UI.WebControls' cannot be found.

Imports System.Web.UI.WebControls
        ~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Inetpub\wwwroot\vipin\try1\test.vb(11) : error BC30002: Type 'Control' is not
 defined.

        Inherits Control
                 ~~~~~~~
C:\Inetpub\wwwroot\vipin\try1\test.vb(12) : error BC30002: Type 'HtmlTextWriter'
 is not defined.

        Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
                                                       ~~~~~~~~~~~~~~

C:\Inetpub\wwwroot\vipin\try1>
End Namespace


Please help urgently

Thanks
Mike


__________________
Regards
Mike
 
Old January 22nd, 2005, 05:21 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Mike,

If it's so urgent, did you try to use Google? There any many articles and forum posts about the error you get.

Anyway, you probably need to add a reference to the System.Web assembly either in your VS.NET project, or on the command line.

HtH,

Imar
 
Old January 29th, 2005, 12:51 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi

I searched in google and found that I had to add the reference for the web.dll in my code like /r:system.web.dll

But now another error comes which states that reference to System.ComponentModal not added. I used imports System.ComponentModal in my code. But didn't work.

Suprisingly when I tried to add a reference byright clicking the solution explorer, there was no such reference (System.ComponentModal).

Now what should I do? Please help






Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Server Control....Custom Property Editor ZArrinPour ASP.NET 1.0 and 1.1 Basics 1 June 15th, 2010 11:30 AM
[Urgent] Server Side custom exception tjacemy General .NET 3 April 3rd, 2007 07:44 AM
Help! Custom Server Control using User Control diehard ASP.NET 1.0 and 1.1 Professional 2 January 4th, 2006 12:33 PM
urgent custom control with collection of controls dd_smith Pro VB.NET 2002/2003 1 December 19th, 2004 06:05 PM





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