I have a label control that is bound to a object collection like
lblUser.DataBindings.Add(new Binding("Text", UserCollection, "UserName"));
This works fine and the Username on the label. But I need to display the Username as
User Name : UserName
How do I add the static “User Name :” part in front of the bound value on the label ?
The way I did is that I created a custom label by extending the Label class and added an override to the text property. And added this to the text property
This solved my issue