C
Chris Kennedy
I have a very basic control. In the ChildControls I have added a
response.write to write a property I have set. I does it on the first
display but when I press the added button control it doesn't write anything.
Can anyone help?
Namespace nscontrols
Public Class clscontrol : Inherits System.Web.UI.WebControls.WebControl
Implements INamingContainer
Dim btn as new button()
Dim _location as string
Public Property Location as String
Get
Return _location
End Get
Set
_location = Value.ToString()
End Set
End Property
Protected Overrides Sub CreateChildControls()
System.Web.HttpContext.Current.Response.Write(_location)
btn.id = "btn"
btn.text = "test"
Controls.add(btn)
End sub
End class
End Namespace
response.write to write a property I have set. I does it on the first
display but when I press the added button control it doesn't write anything.
Can anyone help?
Namespace nscontrols
Public Class clscontrol : Inherits System.Web.UI.WebControls.WebControl
Implements INamingContainer
Dim btn as new button()
Dim _location as string
Public Property Location as String
Get
Return _location
End Get
Set
_location = Value.ToString()
End Set
End Property
Protected Overrides Sub CreateChildControls()
System.Web.HttpContext.Current.Response.Write(_location)
btn.id = "btn"
btn.text = "test"
Controls.add(btn)
End sub
End class
End Namespace