Reputation: 4385
I have the following WhereParameters for LinqDataSource1 in my .aspx file:
<WhereParameters>
<asp:Parameter Name="key1" Type="String" />
<asp:Parameter Name="key2" Type="String" />
</WhereParameters>
How do I assign values to these parameters in my code behind? Thanks.
Upvotes: 0
Views: 3254
Reputation: 28530
You can assign them in the code behind like this:
LinqDataSource1.WhereParameters["Key1"].DefaultValue = "1";
LinqDataSource1.WhereParameters["Key2"].DefaultValue = "2";
Hope this helps.
Upvotes: 2