Hello Madison,
Thanks for your reply.
I'm sorry, maybe I mislead you. DataSource control only supports one record
set. We cannot retrieve multiple record sets with it.
What I mean is that I prefer Coding to DataSource Control. As Bill said,
using one SQLCommand call to retrieve all record sets from underlying
database is a good way. (Just as what you did) We can store the dataset
returned by SQLDataAdapter into Page.ViewState. When postback happens, we
get all records from ViewState, filter it by DataTableView, and bind them
to drop list box. That's fine.
However, if we choose SQLDataSource, it will save us much time on coding.
We can just drag-drop five SqlDataSource controls into page, set select
command/ parameter for each of them, and bind them to dropdownlist
controls. But there will be a performance issue. SqlDataSource will call
underlying DB, each time its parameter changed. For example: if end user
selects another option in (sector) dropdownlist, this will force two
sqldatasource controls (business type and building type) to call its
underlying DB. Thus, customer need wait a long time for this operation.
If you'd like to see some sample with SqlDataSource, you may refer to
http://www.asp.net/learn/data-access...ial-47-vb.aspx
Hope this helps, please feel free to update here again, if there is
anything unclear. It's my pleasure to assist you.
Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.