Hi Emil,
Thanks for contacting Syncfusion support.
We have analyzed your query. You can load the dialog content while open the dialog using our existing ejDialog property “ContentType” by setting its value as “ajax” and along with setting the desired url in “ContentUrl” property. Please refer the following code snippet.
@Html.EJ().Dialog("dialog").Title("Dialog").ContentType("ajax").ContentUrl("Home/Dialog").ShowOnInit(false).IsResponsive(true).ClientSideEvents(evt => evt.Close("onDialogClose")) |
For your convenience, we have attached the sample to show case this. Please get the sample from the below location.
http://www.syncfusion.com/downloads/support/directtrac/general/ze/dialog1297913412
In this sample we have also showcased the data retrieving from dialog in controller section.
To know more about dialog properties, methods and events, please refer to,
http://help.syncfusion.com/js/api/ejdialog
To know about how to load the ajax content in dialog, please refer to,
http://help.syncfusion.com/aspnetmvc/dialog/load-content
Please let us know, if you need any further assistance.
Regards,
Francis Paul A
Hi Emil,
Sorry for the inconvenience.
We have analyzed your query. We suspect that ContentUrl with improper format leads to the incorrect navigation of page which causes your reported issue. If we give ContentUrl like “Home/Dialog” and sets the http://localhost:63279/Home/index as startup page, then ContentUrl mapped from its parent controller and set as http://localhost:63279/Home/Home/Dialog which is invalid.
To resolve this please make sure to give the “ContentUrl” started with “/”, else provide the url as Url.Action(“view”, “controller”). If we set url as “/Home/Dialog”, then it gets mapped as http://localhost:63279/Home/Dialog and which is valid.
Please refer the following code snippet
@Html.EJ().Dialog("dialog").Title("Dialog").ContentType("ajax").ContentUrl("/Home/Dialog").ShowOnInit(false).IsResponsive(true).ClientSideEvents(evt => evt.Close("onDialogClose")) (or) @Html.EJ().Dialog("dialog").Title("Dialog").ContentType("ajax").ContentUrl(Url.Action("Dialog", "Home")).ShowOnInit(false).IsResponsive(true).ClientSideEvents(evt => evt.Close("onDialogClose")) |
Please check with the given solution. If still you are facing any difficulties, please provide more information about your issue. We will be happy to help you.
Regards,
Francis Paul A
Hi Emil,
We have analyzed your query. You can use our components inside ejDialog, when the ejDialog content loaded through ajax request. Please check with the following solution.
Please ensure that whether the unobtrusive mode in web.config file is true or false.
#1) If unobtrusive mode is true (“<add key="UnobtrusiveJavaScriptEnabled" value="true" />”), then please refer the “unobtrusive.min.js” file in “_Layout” Page and you need to trigger the “ej.widget.init()” function before the dialog content opens using “beforeopen” event of dialog.
#2) If unobtrusive mode is false (“<add key="UnobtrusiveJavaScriptEnabled" value="false" />”), then please use “@Html.EJ().ScriptManager()” at the end of partial view (“Dialog”) Page
For your convenience, we have attached the sample in the below location.
http://www.syncfusion.com/downloads/support/forum/121938/ze/Dialog-1108542379
Please check with the given solution and let us know, if you need any further assistance.
Regards,
Francis Paul A
Hi Emil,
Thanks for your update.
We hope that your problem has been resolved now. Kindly get back to us if you need any further assistance.
Regards,
Francis Paul A