<asp:ObjectDataSource ID="ds_ShippingServiceProfiles" runat="server"
SelectMethod="GetCardStatusValues"
TypeName="AccountsDataHelper">
</asp:ObjectDataSource>
public static DataTable GetShippingProfiles(long storeID)
{
}
我可以像storeID
这样获得new websiteDatahelper().SelectedStoreID.Value
如何在使用ObjectDataSource
答案 0 :(得分:0)
为OnSelecting
事件定义处理程序:
<asp:ObjectDataSource ID="ds_ShippingServiceProfiles" runat="server"
SelectMethod="GetShippingProfiles"
TypeName="AccountsDataHelper"
OnSelecting="ds_ShippingServiceProfiles_Selecting">
</asp:ObjectDataSource>
实施活动:
protected void ds_ShippingServiceProfiles_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["storeID"] = new websiteDatahelper().SelectedStoreID.Value;
}