When using the SqlDataSource component with a stored procedure that has an IF-ELSE condition which selects a different set of columns depending on whether the condition is true or false, the returned data schema is always as if the condition is evaluated to true.
While the schema is wrong, if I manually type the fields, at runtime, they get resolved correctly but it is inconvenient.