Hi,
ObjectDataSource1.FilterExpression = "userid LIKE '{0}' AND action LIKE '{1}'";
ObjectDataSource1.FilterParameters.Add("userid", ddlUsers.SelectedValue);
ObjectDataSource1.FilterParameters.Add("action", ddlAction.SelectedValue);
I wirte like this code.
when I run it grid view is empty. BUT, when I write and run it works good.
ObjectDataSource1.FilterExpression = "userid LIKE '{0}' AND action LIKE '{Login}'";
ObjectDataSource1.FilterParameters.Add("userid", ddlUsers.SelectedValue);
ObjectDataSource1.FilterParameters.Add("action", ddlAction.SelectedValue);
Without parameters (action) its shows all login of selected ddlUsers.SelectedValue.
Why does not work like this?
ObjectDataSource1.FilterExpression = "userid LIKE '{0}' AND action LIKE '{1}'";
ObjectDataSource1.FilterParameters.Add("userid", ddlUsers.SelectedValue);
ObjectDataSource1.FilterParameters.Add("action", ddlAction.SelectedValue);