H
HANG LAM
Hi, I created a Custom Web Control.
My problem is , when I registed the control using the following line :
<%@ register TagPrefix="SARSTag" NameSpace="SARSControls"
Assembly="DataTextbox" %>
and then add the control to the page using this line :
<SARSTagataTextbox runat="server" id="DataTextbox1" />
I get an error message on the Designer Screen saying:
"Error Creating Control"
and when I click on the control , it gives me this dialog pop-up saying :
"Value can not be null. Parameter name "
Anybody seen this kind of error before ?
Any help is appreciated ..
Thanks,
hang
Here is my source code for the Custom Control (pretty simple ):
Imports System.ComponentModel
Imports System.Web.UI
Namespace SARSControls
Public Class DataTextbox
Inherits System.Web.UI.WebControls.TextBox
Implements INamingContainer
Private _testID As Integer
Private _resultID As Integer
Private _specimenID As String
Private _labID As Integer
Public Sub New()
MyBase.New()
End Sub
Public Property TestID()
Get
Return _testID
End Get
Set(ByVal Value)
_testID = Value
End Set
End Property
Public Property ResultID()
Get
Return _resultID
End Get
Set(ByVal Value)
_resultID = Value
End Set
End Property
Public Property LabID()
Get
Return _labID
End Get
Set(ByVal Value)
_labID = Value
End Set
End Property
Public Property SpecimenID()
Get
Return _specimenID
End Get
Set(ByVal Value)
_specimenID = Value
End Set
End Property
End Class
End Namespace
My problem is , when I registed the control using the following line :
<%@ register TagPrefix="SARSTag" NameSpace="SARSControls"
Assembly="DataTextbox" %>
and then add the control to the page using this line :
<SARSTagataTextbox runat="server" id="DataTextbox1" />
I get an error message on the Designer Screen saying:
"Error Creating Control"
and when I click on the control , it gives me this dialog pop-up saying :
"Value can not be null. Parameter name "
Anybody seen this kind of error before ?
Any help is appreciated ..
Thanks,
hang
Here is my source code for the Custom Control (pretty simple ):
Imports System.ComponentModel
Imports System.Web.UI
Namespace SARSControls
Public Class DataTextbox
Inherits System.Web.UI.WebControls.TextBox
Implements INamingContainer
Private _testID As Integer
Private _resultID As Integer
Private _specimenID As String
Private _labID As Integer
Public Sub New()
MyBase.New()
End Sub
Public Property TestID()
Get
Return _testID
End Get
Set(ByVal Value)
_testID = Value
End Set
End Property
Public Property ResultID()
Get
Return _resultID
End Get
Set(ByVal Value)
_resultID = Value
End Set
End Property
Public Property LabID()
Get
Return _labID
End Get
Set(ByVal Value)
_labID = Value
End Set
End Property
Public Property SpecimenID()
Get
Return _specimenID
End Get
Set(ByVal Value)
_specimenID = Value
End Set
End Property
End Class
End Namespace