We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

ASP.NET MVC Controls not rendering properly

Hi, I am trying to test the components and I have the following code in my View:

@Html.EJ().FileExplorer("fileExplorer").Path("~/media/").AjaxAction(@Url.Content("~/FileExplorer/FileActionDefault")).Width("900px").Height("400px")
@Html.EJ().Button("btnTest").Width("200px").Height("75px").Text("hello")
I have the following Javascript and css files included:

jquery-1.10.2.min.js
jquery.globalize.min.js
jquery.easing.1.3.min.js
jsrender.min.js
ej.web.all.min.js
flat-azure-dark/ej.web.all.min.css

But when the page load both components are not rendering properly, the file explorer did not shown, having width 950px and height 0px, and the button shown with minimal size without label text, the HTML generated via view source in Chrome shows:

 

However if I use the Javascript version below, the file explorer can render:


I have already included the following entries in web.config > system.web section and added the corresponding reference dll in bin

   

     

       

       

       

     

   

     

       

       

     

   


Did I missed something?


4 Replies

BP Balamurugan P Syncfusion Team August 13, 2015 01:27 PM UTC

Hi Ferry,

Thanks for using Syncfusion Products.

We have analyzed the reported issue, this may occur in any of the following scenarios.

1)     1) This issue may occur if the scripts necessary for our components are not loaded properly. So please ensure that the necessary scripts needed by EJMVC components are referred properly.


2)     2)  In the project web.config file, check whether unobtrusive JavaScript (<add key="UnobtrusiveJavaScriptEnabled" value="true" />) is enabled or not. If it is enabled means you should refer ej.unobtrusive.min.js script file in your project file.

(Or)

If it is set to “false” means, make sure @Html.EJ().ScriptManager() is included in your layout page and there is no necessary to refer ej.unobtrusive.min.js file for this case.
We have attached a sample to showcase EJ button / EJ file explorer is working properly. Can you please check with the sample in the following location? If still you face the problem, share your sample with us with addition details. This would be helpful for us to serve you.

Sample: http://www.syncfusion.com/downloads/support/forum/119901/ze/MVCTesting-1510016873
Please let us know if you have any queries.
Thanks,
Balamurugan P



FT Ferry To August 14, 2015 02:29 AM UTC

Hi, Balamurugan. Thank you so much for the reply.

After I set <add key="UnobtrusiveJavaScriptEnabled" value="false" /> in web.config and added @Html.EJ().ScriptManager() into my layout page, the MVC component can properly render now. :)



BP Balamurugan P Syncfusion Team August 14, 2015 04:19 AM UTC

Hi Ferry,
We are glad to hear that the provided solution helps to you. Please get back to us if you would require any further assistance.
Thanks,
Balamurugan P



BA Balu replied to Ferry To April 5, 2018 09:51 AM UTC

Hi, Balamurugan. Thank you so much for the reply.

After I set <add key="UnobtrusiveJavaScriptEnabled" value="false" /> in web.config and added @Html.EJ().ScriptManager() into my layout page, the MVC component can properly render now. :)


thank you

Loader.
Live Chat Icon For mobile
Up arrow icon