ObjectDataSource SelectParameter is an Object?
im using C# under Visual studio 2010
i have an object datasource that does performs a开发者_开发问答 certain function taking 2 parameters the first is int, the 2nd in a list
how can i pass this list of ints to the object datasource!????
List<int> a = new List<int>();
a=Some Function that populates the list of int by int values;
ObjectDataSource1.SelectParameter["Sources"].DefaultValue=a;
?? ? ?
public WebForm1()
{
this.Init += (o, e) =>
{
myDS.Selecting += (ds, dsArgs) =>
{
dsArgs.InputParameters["filter"] = new List<int> { 1, 2, 3 };
};
};
}
The idea is to set the parameter at the Selecting event.
精彩评论