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.
Unfortunately, activation email could not send to your email. Please try again.

Instructions to Copy and Run the code

How to properly run the copied code copied properly in an ASP sample?

 

Description:

When a piece of code or sample is copied from the Syncfusion sample browser or UG documentation, it cannot be expected to work properly unless certain prerequisites and conditions are met.

 

Solution:

Prerequisites:

 

  • An ASP WebForms application with Syncfusion assemblies installed. Make sure that the required assemblies are included in the project, for ex: (for e.g., Syncfusion.EJ and Syncfusion.EJ.WEB).

 

  • Scripts and Theme files that are required by Syncfusion controls are referred in the Site.Master page. For ex: (for e.g., jQuery v1.10 or higher, ej.web.all.min.js , and ej.web.all.min.css).

 

If the aboveprevious requirements are met, then the code copied from the documentation or demo site and pasted in to the application and will work flawless.

 

Starting from scratch…...

 

When creating a new application to try out the code, check out our Getting started section in UG documentation: https://help.syncfusion.com/aspnet/getting-started.

 

Hint: For a quicker way, the sample creator which that is included in the Syncfusion Dashboard or Syncfusion Project templates available in the Visual Studio can be used.

For more information, refer to the following documentation:

Sample Creator -: https://help.syncfusion.com/extension/aspnet-extension/sample-creator

Project Templates -: https://help.syncfusion.com/extension/aspnet-extension/syncfusion-project-templates

 

Already have an ASP application……

 

For existing applications, check out the manual integration of Syncfusion controls section in the UG documentation: https://help.syncfusion.com/aspnet/getting-started#for-existing-applications.

Hint: For a quicker way, the project conversion utility included in the Syncfusion Dashboard can be used.

For more information, refer to the following documentation:

Project Conversion -: https://help.syncfusion.com/extension/aspnet-extension/project-conversion

 

Special Ccases:

 

Most of the sample codes from the Demo site will work well in any sample that has met the requirements mentioned abovepreviously. In some case where sample requires SQL dataSource or has a separate handler for certain operations, . These samples requires the following additional steps in order to make it work as expected.

Case 1:

For instance, consider the UploadBox sample, here the save and remove handlers are required for to performing save and remove operation respectively. Refer to the following demo link: http://asp.syncfusion.com/demos/web/uploadbox/defaultfunctionalities.aspx

Now a new handler file is needed to be created in the application and the handler code has toshould be pasted there.

Case 2:

Consider the SQL data binding sample in Menu control. Refer to the following Demo link: http://asp.syncfusion.com/demos/web/menu/databinding-sql.aspx

The above previous Demo requires connection string to be registered in the Web.Config file, and also requires the Northwind.mdf database file for the Data.

 

Similar toLike the above previous cases, the requirements can be varied from control to control. The above previous steps can help with almost every demo sample. Still if you couldno’tcould not get the sample working or need further any help, then contact us by creating a support ticket.

Article ID: Published Date: Last Revised Date: Platform: Control:
8269 01/04/2018 01/04/2018 ASP.NET Web Forms General
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.