c# - 字符串 [,] 和中继器

标签 c# asp.net arrays string repeater

我如何用中继器写出我的数组?

string[,] month = { {"Januari", "Februari", "Mars", "Apri", "Maj", "Juni", "Juli", "Agusti", "September", "November", "Oktober", "December"},
                    {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"}
                  };

现在我可以使用 Container.DataItem,但是如何在一个地方获取第一个项目字符串,在另一个地方获取第二个项目字符串?

<a href="Default.aspx?m=01">Januari</a>

最佳答案

看起来你应该在这种情况下使用枚举......即......


enum Month = {January=1, February, March};

Month month = Month.January;
Month alsomonth = (Month)(1); // Should work

关于c# - 字符串 [,] 和中继器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/997949/

相关文章:

c# - C# 中的完整惰性管道

c# - 动态附加 OWIN JWT 资源服务器应用程序客户端(受众)

c# - 无法从动态生成的程序集访问 CodeBase

c# - 如何设置IIS网站的默认编码?

html - 未显示特定分辨率的菜单

python - 将大量数据存储到 numpy 数组中

python - 如何有效地改变数组中一定数量的值?

c# - WPF C# - 列内容对齐和样式取决于内容

c# - 如何使用 WebRequest 发布数据并从网页获取响应

python - 化简双einsum