CslaDatasource Insert Method in a UserControl

CslaDatasource Insert Method in a UserControl

Old forum URL: forums.lhotka.net/forums/t/6450.aspx


AKaplan posted on Tuesday, February 17, 2009

In a page, I need to call a csladatasource insert method that is within a usercontrol. How can I do this? I know this is a stupid question, but I became a little dumbfounded at the moment.

SonOfPirate replied on Wednesday, February 18, 2009

My suggestion is to create an internal/Friend (or public, depending on your needs) method on the UserControl that performs the insert operation.  Then, modify your CslaDataSource Insert method to delegate to this method.  By setting the scope as needed, you can then call the same method from outside of your UserControl.

 

Copyright (c) Marimer LLC