问题描述
如果我在设计时定义一个ObjectDataSource,可我得到从ObjectDataSource控件在运行时的DataTable?我有一个返回,我使用为ObjectDataSource的Select方法属性的DataTable的方法。
If I have an ObjectDataSource defined at design time, can I get a DataTable from that ObjectDataSource at runtime? I have a method that returns a DataTable that I am using for the Select method property of the ObjectDataSource.
推荐答案
我真的不明白你的问题......你要问,如果你在ObjectDataSource控件定义对象可以在配置的选择方法返回一个DataTable?是的,我做这一切的时候。您还可以检查在OnSelected事件中返回的DataTable(它是事件对象的ReturnValue属性)。
I don't really understand your question... are you asking if the object you define in the ObjectDataSource can return a DataTable in the configured select method? Yes, I do it all the time. You can also examine the returned DataTable in the OnSelected event (it is the ReturnValue property of the event object).
这篇关于你可以从一个ObjectDataSource一个DataTable?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!