I need to know the number of records returned after a I have applied a filter to a sqldatasource. I see that one should use the OnSelected event and capture the detail there. However that event is not firing for some reason. I filter a DDL based on a selection from another DDL. The 1st piece of code set the filter - which works - and then I need to see if any rows are returned. If they are I make the 2nd DDL visible and show the records else I make the DDL invisible.
protected void properties_SelectedIndexChanged(object sender, EventArgs e)
PropertySubdivion.FilterExpression = "listing_id = " + properties.SelectedItem.Value.ToString();
<asp:SqlDataSource ID="PropertySubdivion" ConnectionString="<%$ ConnectionStrings:ConnString %>"
ProviderName="<%$ ConnectionStrings:ConnString.ProviderName %>" SelectCommand="SELECT id, listing_id, subdivision FROM para_subdivision"