I've a problem regarding passing select parameters to objectdatasource from code behind.
i would like to pass the select parameters to a objectdatasource ..not in the selecting or selected event of the objectdatasource but some where in the one of button click event.
i tried of adding the parameters but it didn work for me..
Expand|Select|Wrap|Line Numbers
- <asp:ObjectDataSource ID="ODSEditSchedules" TypeName="Schedules" runat="server" SelectMethod="GetParticipants">
- </asp:ObjectDataSource>
im adding the select parameters in a seperate button click event
Expand|Select|Wrap|Line Numbers
- ObjectDataSourceEditParticipants.SelectParameters.Clear();
- ObjectDataSourceEditParticipants.SelectParameters.Add("xxxxxx", xxxxxlabel.Text.ToString());
its throwing an erro saying that there is no GetParticipants method which takes Zero parameters...
and if add the select parameters to the objectdatasource..with some default value to the parameter thn its working.
Expand|Select|Wrap|Line Numbers
- <asp:ObjectDataSource ID="ODSEditSchedules" TypeName="Schedules" runat="server" SelectMethod="GetParticipants">
- <SelectParameters>
- <asp:Parameter Name="xxxx" Type="string" DefaultValue="xxxxx"/>
- </SelectParameters>
- </asp:ObjectDataSource>
Thanks in advance
BTR.