c# - Supply ObjectDataSource with custom list/collection to load -
i know experience linqdatasource has selecting event can supply our own data assigning r.result
i'm looking same behavior objectdatasource. although implemented getalldata() method within custom class: systemsettinglist : list<systemsetting>
now, maybe i'm not thinking here getalldata method within systemsettinglist class have instantiate on page later down line in page load. how tell objectdatasource fetch that object?
you need use selectmethod , typename. this:
<asp:objectdatasource id="objectdatasource1" runat="server" selectmethod="getalldata" typename="yournamespace.systemsettinglist" />
Comments
Post a Comment