---------------------Edited by Colt -------------------------------
<code/> tag was added
---------------------Edited by Colt -------------------------------
Hi all
I need deparate help from you guys
I am developing custom control but prior to that i just tried sample control and tried to access it in asp.net page. Below i have given my code please let me know where i am going wrong.
---------VB Code ASSEMbLY NAME " TestControl "----------------
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Namespace SIControls
Public Class FirstControl
Inherits Control
Private _text As String = "hello"
Public Overridable Property [Text]() As String
Get
Return _text
End Get
Set(ByVal Value As String)
_text = Value
End Set
End Property
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
output.Write([Text])
output.Write("<h1>This is first control</h1>")
End Sub
End Class
End Namespace
---------ASP.NET PAGE CODE ----------------
<%@ Register TagPrefix="SI" Namespace="SIControls" Assembly="TestControl"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>test</title>
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="ProgId" content="VisualStudio.HTML">
<meta name="Originator" content="Microsoft Visual Studio.NET 7.0">
</HEAD>
<body MS_POSITIONING="GridLayout">
<SI:FirstControl runat="server" text="hello" id="FirstControl1" />
</body>
</HTML>
------END ASP.NET PAGE CODE---------
when i try to run this on browser it says that
"
Parser Error Message: Could not load type SIControls.FirstControl from assembly TestControl, Version=1.0.1112.27716, Culture=neutral, PublicKeyToken=null.
Source Error:
Line 11: </HEAD>
Line 12: <body MS_POSITIONING="GridLayout">
Line 13: <SI:FirstControl runat="server" text="hello" id="FirstControl1" />
Line 14: </body>
Line 15: </HTML>
"
PLEase help me out
regards
shamshularphin.