Custom ASP binding mechanism problem

Total Post:104

Points:728
 954  View(s)
Ratings:
Rate this:

I've created my own DataBinding mechanism and I need some solution to do somthing like this:

I have this example code in my ASPX

<myButton id="someID" runat="server" Text="SomeText" BackColor="{SomeContext}" />

I thought that I can use my own class inherited from TypeConverter and catch the moment of converting value {SomeContext} to Color (the BackColor property). I can catch this moment, but I have no info about target control, only empty context of String value. If anyone know how to get target property somehow, will be very!! helpful.

  1. Post:378

    Points:2694
    Re: Custom ASP binding mechanism problem

    Hi Marcel, 


    try this:

    <myButton runat="server"ID="someID">
        <Binding>
           <Bind Target="BackColor" Source="ColorOfBackgroundFromContext"/>
           <Bind Target="ForColor" Source="ColorOfForegroundFromContext"/>
        </Binding> 
    </myButton>

      Modified On Apr-04-2018 06:32:00 AM

Answer