On adding both Classic MVC and EJMVC controls in same project, there can be some issues on rendering both the controls due to missing references and their scripts in the application.
To use both classic and non-classic control in same project, add reference DLLs, StyleManger and ScriptManager for both the platforms accordingly. Following steps illustrate the procedure for adding Captcha in MVC project:
- Refer to the required DLLs in the project for both platforms. Add references to corresponding assemblies based on the .NET framework version and MVC used in the application.
Classic MVC assemblies to refer,
- Add the ScriptManager and StyleManger in Layout page for both the platforms as illustrated in the following code example.
To add scripts and style references for rendering EJMVC controls refer the following link, http://help.syncfusion.com/ug/js/default.htm#!documents/createmanually.htm
- Add the corresponding reference assemblies and namespaces for both the platforms in webconfig file. Refer to the following code example.
- Adding a Captcha to an application requires registering the image handlers under httphandler and handler tags. These image handlers are different from MvcResourcehandler and they work together with them.
- Create the Captcha control in the view page in both classic and non-classic MVC.
For reference, check the following online sample links.
EJMVC Samples demo, http://mvc.syncfusion.com/demos/web/Captcha/Default
Classic MVC Samples demo, http://mvc.syncfusion.com/demos/ui/tools/Captcha/ThroughView
For further reference on creating an application with EJMVC and Classic MVC check the following links.
Getting started with EJMVC, http://help.syncfusion.com/ug/js/documents/createmanually.htm
Getting started with Classic MVC, http://help.syncfusion.com/ug/asp.net%20mvc/documents/creatingsyncfusionmvcapplication.htm