Adding property to class

Discussion in 'ASP .Net' started by Bert, Dec 10, 2006.

  1. Bert

    Bert Guest

    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
     
    Bert, Dec 10, 2006
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.