Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 07, 2008 06:44 AM by kipo
Member
386 Points
156 Posts
Oct 06, 2008 11:54 PM|LINK
How can I programatically set the where parameter of a LINQ DataSource control?
Thanks.
LINQ Datasource control
All-Star
16475 Points
2811 Posts
Oct 07, 2008 06:44 AM|LINK
Try with this:
LinqDataSource1.Where = "CategoryID = 1";
LinqDataSource1.Where = "CategoryID = @CategoryID"; LinqDataSource1.WhereParameters.Add("CategoryID", DbType.Int32, "1");
LinqDataSource1.WhereParameters["CategoryID"].DefaultValue = "1";
dotNet_Stude...
Member
386 Points
156 Posts
Programatically setting LINQ datasource where parameter?
Oct 06, 2008 11:54 PM|LINK
How can I programatically set the where parameter of a LINQ DataSource control?
Thanks.
LINQ Datasource control
kipo
All-Star
16475 Points
2811 Posts
Re: Programatically setting LINQ datasource where parameter?
Oct 07, 2008 06:44 AM|LINK
Try with this:
or this: or like this if you have Where clause declared inside LinqDataSource: