Click here to Skip to main content
15,919,479 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here i am access my user control on my aspx page.

<uc2:colorcontrol id="ColControl" runat="server" color="Red,White,Green" xmlns:uc2="#unknown" />

How to create color tag in user control so i can get attributes like red,White ,Green.... and assign them a value like true or false.
Updated 30-Jul-10 21:26pm

1 solution

Define a public bool property in your Usercontrols that has both get and set in it. Define as many properties you want to.

You will be able to access them in the designer and be able to set true/false for them.
Share this answer
kapil0411 2-Aug-10 1:19am    
Thanks for your quick response.
Actually when user types color class property in the user control tag in aspx page, we should get intellisense of nested property (Child property) i.e we will get nested property like color red,blue,green and we can select value true or false accordingly.

Similarly to style tag work.i.e style="color:Red;Width:100%;". .
i have done like this in my user control but i am not able to select multiple color and set value.

bool red,blue,green;
public RainbowClass()
public bool Blue
get { return blue; }
set { blue=value; }

public bool Green
get { return green; }
set { green=value; }
awating for your response.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900