views:

28

answers:

0

here's my code. I have a dataset that has its values and then i run an independent query which uses the same tables as dataset. now when i run the dataset, i want it to get a where condition on the query result. here's the code - sql = "SELECT ID, name FROM books WITH(NOLOCK) WHERE id =" & Session("ID") ds = FillDataset(sql) Sql1 = "SELECT n.id as id,a.name as title FROM books n WITH(NOLOCK)" & _ "LEFT JOIN new_books a WITH(NOLOCK) ON a.id = n.book_id " rd = ExecuteReader(SqlCnn, Sql1)

Now after this i make an htmltable and all the cells are loaded with the data from datareader(rd). but 1 dropdown is loaded from the dataset. i want that dropdown to have the selectedvalue which is the value from the datareader(rd). how can i do that?