Those scripts can be just dropped in without the need to include script into the execute case statement.
Take this code save it into Master/Root/App_code/Custom or My_Folder/NameOfYourScript.cs
using Centralpoint.Web;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using Centralpoint;
using System.Data.SqlClient;
using ExtensionMethods;
using Centralpoint.Web.Cms;
using Centralpoint.Web.Cms.DataTransfer;
namespace Centralpoint.Master
{
public partial class DataTransferCpScripting
{
[CpScript("custom_scriptName")]
public static string CustomMethodName(DataTransferCpScripting scripting, NameValueCollection collection)
{
HttpContext.Current.Trace.Warn("custom_scriptName", "custom_scriptName");
return "MyKey";
}
}
}
Take this code save it into Website/Root/App_code/Custom or My_Folder/NameOfYourScript.cs
using Centralpoint.Web;
using System;
using System.Collections.Specialized;
using System.IO;
using System.Text;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
namespace Centralpoint.WebSite._Scripting.my_Script
{
public class my_Script
{
private CpScripting Scripting { get; set; }
private NameValueCollection Collection { get; set; }
private StringBuilder Builder { get; } = new StringBuilder();
public my_Script(CpScripting scripting, NameValueCollection collection)
{
Scripting = scripting;
Collection = collection;
}
[CpScript("my_CustomScript")]
public static string Execute(CpScripting scripting, NameValueCollection collection)
{
return "my_CustomScript";
}
}
}