Skip to main content

Hi all!


I have K2SmartForm page and K2docattachement control on it.


All is working fine, but I desided to move some K2docattachement properties into Web.config file in order to easy move project from one server to another. So I tried to redefine properties manualy in the Page_Load event:


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    K2docattachment1.SharePointServer = "http://my_server_name"
    K2docattachment1.DocumentLibraryServer = "http://my_server_name"
End Sub


After building the project I open my page in browser and see K2docattachement control. Then I click at paperclip sign in order to attache a file. But I see tht the "Add" button is disabled and the "Destination:" is clear :(


What I do wrong?

Thank you Blake! 


Greate! So, I have 33 webforms with K2docattachment control on it, and now I must to make 66 changes when moving project from the test server to the production server :(


UPDATE:


Alternate solution is to create in K2.Net Studio data field (named for example "K2ServerUrl") with default value http://server_url Save and export the project to the server. For the K2docattachment control set properties "SharePoint Server" and "DocumentLibraryServer" to "ProcData:K2ServerUrl". Save and rebuild web project. Enjoy ;)


Reply