|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Placeholder ControlI am trying to add a property to a class that is derive from asp:placeholder. ? I have tried this but get an ambigous name error: Imports System.ComponentModel Imports System.Web.UI <DefaultProperty("Text"), ToolboxData("<{0}:WebCustomControl1 runat=server></{0}:WebCustomControl1>")> Public Class WebCustomControl1 Inherits System.Web.UI.WebControls.PlaceHolder Dim _text As String Dim _kutje As String <Bindable(True), Category("Appearance"), DefaultValue("")> Property [Text]() As String Get Return _text End Get Set(ByVal Value As String) _text = Value End Set End Property Public Property kutje() As String Get Return _kutje End Get Set(ByVal Value As String) _kutje = Value End Set End Property Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter) output.Write([Text]) End Sub End Class How to go about? thanks B Remove the "Text" property from the class file.
The Grand Master Bert wrote: Show quoteHide quote > Hi > > I am trying to add a property to a class that is derive from > asp:placeholder. ? I have tried this but get an ambigous name error: > > Imports System.ComponentModel > > Imports System.Web.UI > > > > > > <DefaultProperty("Text"), ToolboxData("<{0}:WebCustomControl1 > runat=server></{0}:WebCustomControl1>")> Public Class WebCustomControl1 > > Inherits System.Web.UI.WebControls.PlaceHolder > > Dim _text As String > > Dim _kutje As String > > <Bindable(True), Category("Appearance"), DefaultValue("")> Property [Text]() > As String > > Get > > Return _text > > End Get > > Set(ByVal Value As String) > > _text = Value > > End Set > > End Property > > Public Property kutje() As String > > Get > > Return _kutje > > End Get > > Set(ByVal Value As String) > > _kutje = Value > > End Set > > End Property > > Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter) > > output.Write([Text]) > > End Sub > > End Class > > > How to go about? > > thanks > > B I just ran your code and it worked fine
The Grand Master Bert wrote: Show quoteHide quote > Hi > > I am trying to add a property to a class that is derive from > asp:placeholder. ? I have tried this but get an ambigous name error: > > Imports System.ComponentModel > > Imports System.Web.UI > > > > > > <DefaultProperty("Text"), ToolboxData("<{0}:WebCustomControl1 > runat=server></{0}:WebCustomControl1>")> Public Class WebCustomControl1 > > Inherits System.Web.UI.WebControls.PlaceHolder > > Dim _text As String > > Dim _kutje As String > > <Bindable(True), Category("Appearance"), DefaultValue("")> Property [Text]() > As String > > Get > > Return _text > > End Get > > Set(ByVal Value As String) > > _text = Value > > End Set > > End Property > > Public Property kutje() As String > > Get > > Return _kutje > > End Get > > Set(ByVal Value As String) > > _kutje = Value > > End Set > > End Property > > Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter) > > output.Write([Text]) > > End Sub > > End Class > > > How to go about? > > thanks > > B
Retrieving info out of a MDB
Commercial copy protection? Need some help... ERROR: The state information is invalid for this page and might be corrupted Merging Java and VB for alert box Retrieve Hard Disk Serial Number or othe unique PC identifier - XP & 2K How to Add *AND* Process Checkbox Column in a DataGridView? WebBrowser BeforeNavigate2 - What is pDisp? How to create an IDE? Creating A Movie Player? |
|||||||||||||||||||||||