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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -