开发者

How to access created enum in C# from code behind to aspx file

开发者 https://www.devze.com 2023-03-08 13:10 出处:网络
Below is my code behind C# code: namespace Test开发者_如何学编程 { public enum en { One, Two } } How can I access this created enum in my aspx file? Like using the enum in this code:

Below is my code behind C# code:

namespace Test开发者_如何学编程
{
    public enum en
    {
       One,
       Two
    }

}

How can I access this created enum in my aspx file? Like using the enum in this code:

<%


%>

Thanks


This seems to work ala BoltClock (en didn't seem like a very good name).

namespace Test
{
    public enum MYENUM
    {
        One,
        Two
    }
}

<% Response.Write(Test.MYENUM.One.ToString()); %>
0

精彩评论

暂无评论...
验证码 换一张
取 消