【发布时间】:2014-06-18 22:50:49
【问题描述】:
如何在 mvc razor 视图的一个视图中在特定时间获取和插入数据?我的意思是在创建视图中从数据库中填充一个下拉列表。
我想在添加主题和作弊模型时填写以下内容。
- 部门列表
- 学期清单
- 标准列表
- 流列表
作弊模型:
namespace firstapp.Models
{
public class chepter
{
[ForeignKey("dip_id")]
public int dipart_id { get; set; }
public int chep_id { get; set; }
public string subject { get; set; }
public string chepter { get; set; }
public List<dipartment> dipartlist { get; set; }
public List<dipartment> stdlist { get; set; }
public List<dipartment> semlist { get; set; }
public List<dipartment> stremlist { get; set; }
}
}
部门模型:
namespace firstapp.Models
{
public class dipartment
{
public int dip_id { get; set; }
public string dipart { get; set; }
public string std { get; set; }
public string sem { get; set; }
public string strem { get; set; }
}
}
【问题讨论】:
-
这是 java ........不是 mvc 请在 mvc 中给我 ans ......
标签: c# asp.net-mvc asp.net-mvc-4