Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET control property with [Flags] enum

I have developed an ASP.NET control for which one of the properties is a [Flags] enum. However, I don't seem to be able to specify multiple flags for this property in the ASP.NET control markup. Is there a special syntax to do this or is it just not possible?

like image 601
Chris Avatar asked Dec 01 '09 21:12

Chris


1 Answers

Maybe I'm understanding the question wrong, but can't you set the enum value with a comma-separated string.

E.g. if I have this property in my control:

public System.IO.FileOptions Options { get; set; }

The I can set it in the markup like this:

<uc1:MyControl ID="control1" runat="server"
    Options="DeleteOnClose,Asynchronous" />
like image 134
M4N Avatar answered Oct 09 '22 17:10

M4N