日期:2014-05-20 浏览次数:20493 次
@model MvcForum.Models.Topic @{ ViewBag.Title = "Details"; } <style type="text/css"> hr { border: 0; background-color: #F0F0F0; height: 1px; } </style> <script src="../../Scripts/ckeditor/ckeditor.js" type="text/javascript"></script> <h2> 话题</h2> @*以下内容显示Topic内容*@ @Html.ActionLink("回复","Reply") <fieldset style="padding: 10px 0px 10px 0px"> <legend>@Html.DisplayFor(model => model.Subject)</legend> <br /> <div style="float: left;"> 楼主</div> <div style="border-width: 1px; text-align: right;"> 发表于: @Html.DisplayFor(model => model.PubTime) </div> <hr /> <div style="margin: 20px 20px 20px 20px;"> @Html.DisplayFor(model => model.Details) </div> <hr /> <div style="text-align: right"> 引用|管理|对我有用[0]|丢个板砖[0]|top</div> </fieldset> @*以下内容显示Reply内容*@ @{int i = 1; foreach (var item in Model.Reply.OrderBy(m=>m.ReplyTime)) { <br /> <div style="float: left;">@Html.Label(i.ToString())楼</div> <div style="border-width: 1px; text-align: right;"> 回复于: @Html.Label(item.ReplyTime.ToString()) </div> <hr /> <div>@Html.Label(item.ReplyContent)</div> <hr /> <div style="text-align: right"> 引用|管理|对我有用[0]|丢个板砖[0]|top</div> i++; }} @*通过一个按钮做提交回复,不过这里无法提交,因为在Control里面无法得到Reply类*@ @using (@Html.BeginForm()) { MvcForum.Models.Reply reply = new MvcForum.Models.Reply(); @Html.DisplayFor(model => model.TopicID); <textarea class="ckeditor" id="editor1" name="editor1" cols="100" rows="10">@Html.DisplayFor(model => model.Subject)</textarea> <input type="submit" value="提交回复" /> }