Kentico CMS provides various built-in web parts. We can also have our custom web parts and use them within our pages as this flexibility is provided by Kentico CMS system.
Below steps are to be followed to create and use a new custom web parts using Kentico CMS.
1) Open the WebProject solution created at the time of installing Kentico.
2) Within the folder 'CMSWebParts' create a new folder lets say 'CustomWebParts'.
3) Create a new UserControl(ascx file) with required functionality within this folder(Let the name is Timer.ascx).
4) Add the following line to the beginning of the code:
Example in C# :-
using
CMS.PortalControls;
5) In the ascx file we have to change the following lines:-
public partial class
CMSWebParts_CustomWebParts_Timer: System.Web.UI.UserControl
public partial class
CMSWebParts_CustomWebParts_Timer: CMSAbstractWebPart
to
public partial class
CMSWebParts_CustomWebParts_Timer: CMSAbstractWebPart