62,025
社区成员
发帖
与我相关
我的任务
分享
public class MessageInfo
{
public string OpenID { get; set; }
public string NickName { get; set; }
public string Message { get; set; }
public string SendTime { get; set; }
public int ActivityID { get; set; }
public int flag { get; set; }
}
[HttpGet]
public ActionResult index(int? actID)
{
ViewBag.actID = actID;
return View();
}
[HttpPost]
public ActionResult index(MessageInfo mes)
{
return View(mes);
}
@model weixintest.Models.MessageInfo
@{
ViewBag.Title = "index";
}
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<div>
@Html.ActionLink("返回消息控制台", "Index", "Console")
</div>
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.OpenID, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.OpenID, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.OpenID, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.Message, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Message, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Message, "", new { @class = "text-danger" })
</div>
</div>
@{ Model.SendTime= DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString();}
@{ Model.ActivityID = ViewBag.actID;}
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="消息上墙" class="btn btn-default" />
</div>
</div>
</div>
}
@{ Model.SendTime= DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString();}
@{ Model.ActivityID = ViewBag.actID;}