Dav*_*vid 42
只是设置"Value"和"Key"为dataValueField和dataTextField.您可以在View本身或您的操作中执行此操作(尚未测试下面的代码).
var targets = new Dictionary<string, string>();
targets.Add("Key", "Value");
ViewData["MyList"] = new SelectList(targets, "Key", "Value");
| 归档时间: |
|
| 查看次数: |
8869 次 |
| 最近记录: |