Hello
Is it possible to set or change ContentUrl property before opening Dialog? I have tried to set a different url in the BeforeOpen event, but it doesn't work.
Something like this:
@{Html.EJ()
.Dialog("addDialog")
.Title("Dialog")
.ShowOnInit(false)
.ContentType("ajax")
.ContentUrl("/index.html") // this works
.ClientSideEvents(e => e.BeforeOpen("onBeforeDialogOpen"))
.Render();
}
function onBeforeDialogOpen(sender) {
sender.model.contentUrl = "http://localhost:63659/index2.html"; // this does not
}
Thanks, Tom
Update: From this demo:
https://aspdotnetcore.syncfusion.com/Dialog/AjaxContent#/material
it seems that it's possible to load content using ajax, but I can't make it work with ASP.NET MVC Dialog.