How to render the Syncfusion MVC control without using MVC Resource handlers?
Support is provided to render the Syncfusion MVC controls without using the MVC Resource handler. This feature helps to resolve the issues with Syncfusion control while hosting your application under web Garden/ Server Farm without sticky session.
With the help of MVC Resource handler, you can access/get the appropriate JS files and CSS files to render the Syncfusion control like Upload box while page initiates to loading. Henceforth without proper response (Script file/ CSS file) from Server, the control doesn’t render properly.
Refer to the following steps to render the Syncfusion controls without using handlers.
- Remove the MVC Resource handler reference in both handlers and http handlers under System.webserver and System.web respectively. Refer to the following code example.
<system.web> <httpHandlers> <add verb="*" path=" MvcResourceHandler.axd " type=" Syncfusion.Mvc.Shared.MvcResourceHandler, Syncfusion.Shared.Mvc, Version=XX.XXXX.X.XX, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" validate="false" /> </httpHandlers> </system.web> <system.webServer> <handlers> <add verb="GET,HEAD" name="MvcResourceHandler" path="MvcResourceHandler.axd" type="Syncfusion.Mvc.Shared.MvcResourceHandler, Syncfusion.Shared.Mvc, Version=XX.XXXX.X.XX, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /> </handlers> </system.webServer>
Note: The above handlers should be removed from web.config files, as it can trigger the control to access its resource files from server.
- Unzip and include the Script and CSS files that is available in the following location under Scripts and Content folder in your project respectively.
Note: The above zip contains Scripts and CSS files for tools and grid control related to 126.96.36.199 version
- Refer to the dependent Scripts and CSS files in layout page that is included in previous step.
The above mentioned Scripts and CSS belongs to Tools and Grid controls and it should be referred before to Script Manager in layout page.
Note: Refer to sf-commonall.min.js file as a mandatory to render any Syncfusion controls and maintain same order as mentioned in the above table.
- There is no need to render the Style Manager, since you have referred all dependent CSS files in local and then Set Marble theme as default for Syncfusion MVC controls in web.config since attached zip file contains Marble theme Stylesheet only.
<appSettings> <add key="SyncfusionTheme" value="Marble" /> </appSettings>
- Render and set SkipRegister property to true in Script Manager in layout page. Refer to the following code example.
Note: The SkipRegister property is available from Essential Studio volume 3, 2014.