My webform have mix up of K2 web controls and ASP.net controls as well as third party controls.
It is my data submission page, I set the page to "Plan Page", and have a K2 submit button with type set to "PlanButton"
For the K2 controls, I can bind the data to the process by setting the DataField property.
And I have a third party date selector control and I want to let user to select a date from the control and it will integrated to one of the process data field.
So in the OnClick event of the submit button, i have this codes:
.Value = DateControl.Date;
myConnection.StartProcessInstance(myProcessInstance, false);
myConnection.Close();
But when the user click the submit button, 2 process instance is create.
I think it is because the PlanButton will create a process instance by itself and another one is created by my code.
So I changed the button type to "FinishButton", but now when I click the submit button. The page throw a "System Exception: Invalid serialnumber" exception. However I check in the workspace manager, the process instance is successfully created, so what's wrong with my code.
Thanks in advance.