日期:2014-05-17 浏览次数:20385 次
@{
ViewBag.Title = "AjaxForm";
}
@using (Ajax.BeginForm("AjaxFormPost",new AjaxOptions(){ HttpMethod="POST", UpdateTargetId="ibox"}))
{
<input type="text" name="name" />
<input type="submit" value="提交" />
<div id="ibox" style="width:300px; height:100px; margin:0px auot; border:1px solid #ccc;"></div>
}
public string AjaxFormPost(string name)
{
//List<string> ew = new List<string>();
//ew.Add(name);
//return View(ew);
return name;
}
@{
????ViewBag.Title?=?"AjaxForm";
}
?
????<div?id="ibox"?style="width:300px;?height:100px;?margin:0px?auot;?border:1px?solid?#ccc;"></div>?
@using?(Ajax.BeginForm("AjaxFormPost",new?AjaxOptions(){?HttpMethod="POST",?UpdateTargetId="ibox"}))
{
????<input?type="text"?name="name"?/>
????<input?type="submit"?value="提交"?/>
}