我无法将数据从视线传送到控制器, 我可以看到, 在我的第一个视图模型“TimeLineModel” 中, 我的视图模型从对控制器的动作转到了这个视图中。
public ActionResult confirmation(long socialbuzzCompaignId)
{
return View(new TimeLineModel() { socialBuzzCompaignId = socialbuzzCompaignId, BuzzMessages = model });
}
这样我就能从我的动作中得到信息, 并在视图上显示它, 但我有其他动作 POST, 我无法得到我的视觉模型来做一些特质 。
[HttpPost]
public ActionResult confirmation(TimeLineModel model)
{
}
i can get some propretie of the model but in others no , for example i can get the properti "socialBuzzCompaignId" of model , but other propertie like "IEnumerable BuzzMessages" i can t get it , i dont now why !! this is the content of my view
@model Maya.Web.Models.TimeLineModel
@{
ViewBag.Title = "confirmation";
}
@using (Html.BeginForm())
{
<h2>confirmation</h2>
<fieldset>
@foreach (var msg in Model.BuzzMessages)
{
<div class="editor-label">
@msg.LongMessage
</div>
<br />
}
<p>
<input type="submit" value="Save" />
</p>
</fieldset>
}