CUSTOM ASP BINDING MECHANISM PROBLEM

marcel ethan

Total Post:105

Points:735
Posted by  marcel ethan
 689  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. Sumit Kesarwani

    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>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!