【发布时间】:2014-01-11 22:23:54
【问题描述】:
如何将此字典绑定到网格视图 -
Dictionary<int, Actor> actors = new Dictionary<int, Actor>{
{
1,new Actor
{
ActorId = 1,
ActorName= "Rajanikant",
BirthDate =DateTime.Parse("12-12-1949"),
BirthPlace ="Bangalore",
Photo ="~/Images/1.jpg",
Movies = new List<string>{"Shivaji (2007)","Baba (2002)","ChaalBaaz (1989)"}
}
},
{
2,new Actor
{
ActorId = 2,
ActorName= "Jennifer Aniston",
BirthDate =DateTime.Parse("11-2-1969"),
BirthPlace ="Sherman Oaks",
Photo ="~/Images/2.jpg",
Movies=new List<string>{"Friends (1994)","Bruce Almighty (2003)","Just Go with It (2011)"}
}
},
};
在asp.net中使用c#
【问题讨论】:
-
你也可以标记编程语言吗?
-
它在绑定的网格视图中显示一些通用类名
标签: c# asp.net gridview dictionary