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