我使用 mvc devexpress 我的问题是:当我通过 ajax 在模态弹出窗口中重新加载部分视图时,除部分视图之外的所有内容都删除
,我想要包含部分视图的弹出窗口,我可以通过单击(弹出窗口中的按钮)使用 ajax 刷新部分视图,并且在单击并刷新部分视图后弹出窗口保持打开状态,我只想在弹出窗口中刷新部分视图,并且弹出窗口保持打开状态:(
请帮助我这是我的代码
@Html.DevExpress().PopupControl(
settings =>
{
settings.Name = "GetDatepopUp";
settings.PopupElementID = "GetDate";
settings.PopupAction = PopupAction.LeftMouseClick;
settings.CloseAction = CloseAction.CloseButton;
settings.Modal = true;
settings.ShowShadow = true;
settings.ShowFooter = false;
settings.ShowHeader = true;
settings.PopupAnimationType = PopupAnimationType.Slide;
settings.Width = 50;
settings.Height = 50;
settings.AllowDragging = false;
settings.EnableAnimation = true;
settings.ShowLoadingPanel = true;
settings.ShowOnPageLoad = false;
settings.SetContent(() =>
{
@Html.RenderPartial("CalenderContainerPartialView", "Message");
});
}).GetHtml()
***************************************************************
@using (
Ajax.BeginForm(
"CalenderContainerPartialView",
new AjaxOptions
{ HttpMethod = "Post",
UpdateTargetId = "PartialToRefresh",
InsertionMode = InsertionMode.Replace
}
))
{
@Html.TextBox("Name");
@Html.DevExpress().Button(
settings =>
{
settings.Name = "chkfffff" ;
settings.Text = "test";
settings.UseSubmitBehavior = true;
}).GetHtml()
}
<br />
<div id="PartialToRefresh">
@{Html.RenderPartial("Calender");}
</div>