It works well for me in my current project.
The partial view uses the Inherit control add-in , as well as the full view, to strongly apply the Model object to the data type.
, ajax div. - .
LiteralMessage.ascx
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<string>" %>
<%= Model %>
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult ReturnId(int id)
{
return PartialView("LiteralMessage", string.Format("Hello world! Id: {0}", id));
}
, .
, !
:, jQuery, ajax success. (, DIV MyDialogMessage DIV MyDialog)
function doSuccess(result)
{
$('div#MyDialog div#MyDialogMessage').html(result);
$('div#MyDialog').dialog('open');
}