Skip to main content
Hi Guys,

This may seem like a strange request, but I have a problem. I am not a programmer and my primary job isn't development, but I am adept enough to write simple C# and produce basic forms applications.

Smartforms have been great for my purposes. However, due to various problems and errors, K2 have been steering us away from using Smartforms, and using regular .aspx Web Forms invoking the K2ROM.

So - I downloaded the tutorial from the portal. One problem - the tutorial only shows me how to put everything (opening connection to the K2 server, starting a process instance, handing the data to K2 Datafields, closing the connection) *within* the On_Click event of my submit button.

This is useless to me: if a user doesn't have rights on the process, they never see the error message that tells them this. It only gets logged in the K2 Server log. And my users think that the process is broken :(

As soon as I re-jig the form so that the connection is opened on Page_Load and everything else is carried out on the submit button's On_Click, Visual Studio throws a million errors at me.

Cany anyone, please, give me a sample of a regular web form invoking the K2 ROM so that I can see all this in context?

Thanks for reading thus far and TIA for any help provided.

Cheers! Richard
Hi,

I will include an example, but you need to change a few settings here and there to make the example work like:

In the IIS web.config:
  
<appSettings>
<add key="K2Process" value = "K2VBD-VB-UpdateComments" />
<add key="K2Server" value = "k2win2003server" />
<add key="WebRoot" value = "http://localhost/UpdateComments/" />
</appSettings>


Your IIS startup page is Topic.aspx that will kick off the K2.net process.

I included the K2 Solution and the IIS application in temp.zip.

Hope this helps.

Regards,
David
David, you truly are a K2 Legend.

Thanks 1,000,000 for your help :)

Richard
🙂, np.

Reply