---
title: "Custom ASP binding mechanism problem"  
description: "Custom ASP binding mechanism problem"  
author: "marcel ethan"  
published: 2014-08-23  
updated: 2014-08-23  
canonical: https://www.mindstick.com/forum/2113/custom-asp-binding-mechanism-problem  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Custom ASP binding mechanism problem

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](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over)" Text="SomeText" BackColor="{SomeContext}" />

I thought that I can use my own [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) inherited from TypeConverter and catch the moment of converting value {SomeContext} to [Color](https://www.mindstick.com/articles/77/how-to-split-form-background-color-in-c-sharp) (the BackColor [property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp)). I can catch this moment, but I have no info about [target](https://yourviews.mindstick.com/view/81207/small-industries-should-be-the-target-of-economic-relief-package) [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control), only empty [context](https://www.mindstick.com/forum/23245/what-is-context-in-android) of [String value](https://www.mindstick.com/forum/159623/how-to-get-an-enum-value-from-a-string-value-in-c-sharp). If [anyone](https://www.mindstick.com/articles/23207/how-to-find-the-best-fit-job-for-anyone) know how to get target property somehow, will be very!! helpful.

## Replies

### Reply by Sumit Kesarwani

Hi Marcel, \
try this:

```
<myButton runat="server"ID="someID">    <Binding>       <Bind Target="BackColor" Source="ColorOfBackgroundFromContext"/>       <Bind Target="ForColor" Source="ColorOfForegroundFromContext"/>   
</Binding>  </myButton>
```


---

Original Source: https://www.mindstick.com/forum/2113/custom-asp-binding-mechanism-problem

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
