BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Hi Lory,
Thanks for conducting Syncfusion support.
We have analyzed your query. Generally partial views doesn’t refer any layout page. To render the scripts of EJ controls we need to include the @Html.EJ().ScriptManager() in layout page. We suspect that you may have render the partial view directly from controller. When we render the partial view directly like this, it doesn’t refer the script files from _Layout file. The reported issue raised due to this. So we need to render the partial view in the view page. Please refer the below code snippet,
[View]
@model DPForModel126.Models.datepicker1
@{ Html.RenderPartial("_Justification", Model); // Here _Justification is the Partial view } |
[Controller]
public ActionResult Index() { datepicker1 dp = new datepicker1();//Here datepicker1 is the model class dp.Value = DateTime.Now ; //Here we can set the value of the datepicker return View(dp); } |
[Partial View]
@model DPForModel126.Models.datepicker1
<div class="frame"> <table> <tr> <td> <span>Enter date</span> </td> <td> @Html.EJ().DatePickerFor(model => model.Value) </td> </tr> </table> </div> @Html.EJ().ScriptManager() |
In the end of the partial view page we need to refer the @Html.EJ().ScriptManager if in your project file unobtrusive mode has been set as false. For more information about “to render our control with partial view using Ajax”, please refer the below document: Partial View using Ajax
If you install the NuGet package in your application then it will be automatically added the script and theme files in your application. We need to refer those script and theme files in our layout page. For more details about NuGet configuration and installation, please refer the below link,
For your reference, we have attached a sample to showcase that our control render properly with partial view. It can be download from the below location
Sample Location: sample
If you still face the same issue, kindly get back to us with more information or revert back the provided sample based on your application along with the replication procedure to reproduce the issue at our end. This would help us identify the issue and provide a solution at the earliest.
Regards,
Prasanth P