I'm attempting to databind on the CreatedByUser & CreatedDate properties on a ModuleAuditControl using something like this. (This is just an excerpt. I have sucessfully databound on other controls/properties.)
<asp:FormView ID="FormView1" runat="server" DataSourceID="JobOpeningDataSource" DataKeyNames="OpeningID" DefaultMode="Insert">
<EditItemTemplate>
<dnn:Audit ID="ctlAudit" runat="server" CreatedByUser='<%# Bind("CreatedByUser") %>' CreatedDate='<%# Bind("CreatedDate") %>'/>
</EditItemTemplate>
</asp:FormView>
I get this compiler error: The property or indexer 'DotNetNuke.UI.UserControls.ModuleAuditControl.CreatedByUser' cannot be used in this context because it lacks the get accessor
I'm assuming there's a good reason why the CreatedByUser & CreatedDate properties on the ModuleAuditControl only implement a Set and not a Get, but can anyone tell me if I'm missing anything. (I don't completely understand why a Get accessor is needed in the situation anyway. I'm only trying to Set.)
As you can see, I was using an ASP.NET 2.0 ObjectDataSource to retrieve my data object and was doing all of the databinding w/o any code-behind, similar to how Michael Washington did in his example Guestbook module here. Is there a way to bind these properties automatically using an ObjectDataSource, or is this just a situation in which I should scrap the ObjectDataSource and manually implement databinding in the code-behind the way most of the core modules do.
I'm beginning to suspect that using an ObjectDataSource is a quick way to get a module functional, but if you want to implement some more advanced features such as the ModuleAuditControl, you may be better off "manually" databinding in the code-behind (Page_Load event) Am I missing anything? Thoughts?
Thanks in advance.