Sunday 2 November 2014

Create k2 Custom Controls

Note: Custom controls will be used in K2 SmartForms.

How to create custom controls.
Need to add K2 related dlls

SourceCode.Forms.Controls.dll
SourceCode.Forms.Controls.Web.SDK.dll
SourceCode.Forms.Controls.Shared.dll
Add above dlls to your web application.

Create a class library.
Add above dlls.
Open .cs file, write code.

Setting a project item to Embedded Resource:
Click on the Item from project.
Go to Properties for the item.
Change the Build Action by selecting "Embedded Resource" from the dropdown

Add certificate.
Build your project, you will get one .Net .dll.
Now add that .Net .dll to SmartForms, using ControlUtil.exe.
C:\Program Files (x86)\K2 blackpearl\Bin
In this path u can find ControlUtil.exe