我想让它绑定到下拉列表中。到目前为止,我所做的是下面的代码,这是在视图中编码的。将常量值绑定到dropdownlist的最佳方式是什么?我想在控制器中实现它,并在视图中调用它。@{
var dropdownList = new List<KeyValuePair<int, string>> { new KeyValuePair<int<
我有一些代码将枚举绑定到下拉列表,但是,我希望构建下拉列表,以便从枚举中获取值的整数值和文本的description属性。我尝试将kvPairList定义为int/string并转换为enumValue,(int)我也尝试了converting.toInt32 using System.ComponentModel;
namespace c
在gridview中绑定字典对象时,我面临着问题。Dictionary<string, int[]> final_list = (Dictionary<string, int[]>)Session["InstrumentBatch"];//The data gets populated in the final_listList<KeyV
下面是我如何制作我的GridView:public class Entry public Entry(BitmapImage icon =new List<EntryKeyValuePair>(); public List<EntryKeyValuePair> EntryKeyValuePairs { get; }EntryK