create a bindable property

Discussion in 'ASP .Net' started by Tommy, Nov 4, 2004.

  1. Tommy

    Tommy Guest

    I have subclassed the textbox and added a property to it with the following
    code:

    '--------------------------------------------------------
    Imports System.ComponentModel
    Public Class clsTextBox
    Inherits System.Web.UI.WebControls.TextBox
    Private _iPricePk As Integer
    <Bindable(BindableSupport.Yes)> Public Property iPricePK() As Integer
    Get
    Return Me._iPricePk
    End Get
    Set(ByVal Value As Integer)
    Me._iPricePk = Value
    End Set
    End Property
    End Class
    '--------------------------------------------------------

    It shows up in the designer and acts like it's getting bound but when i
    check the value of the property in my code it still has the default value.

    Is there something else that needs to be done to make this actually bind?

    Thanks
     
    Tommy, Nov 4, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    1
    Views:
    574
    Steve
    Sep 30, 2006
  2. MrB

    server control simple bindable property

    MrB, Dec 23, 2003, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    151
  3. MrB

    custom control bindable property

    MrB, Dec 29, 2003, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    222
  4. Tommy

    bindable property to extend the textbox

    Tommy, Nov 5, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    149
    Tommy
    Nov 5, 2004
  5. Craig Buchanan
    Replies:
    0
    Views:
    170
    Craig Buchanan
    Aug 22, 2007
Loading...

Share This Page