Hi Randall, sorry, I'm just not getting it. Can you tell me in high-level (i.e. end user) terms what you're trying to accomplish, like the guy selects a category from a dropdown, you show some data, etc. I'm wondering if what you're trying to achieve is a grid-like thing where each row has a dropdown, and when you select that dropdown the rest of the row fills out in a format specific to that type of selection? Were that the case, you might want something other than a repeater.
----- Randall wrote: -----
Hi Bill,
Thanks for replying back to me.
Here is the scenario.
commandString1= " Select TC.CategoryID, T.TopicName, C.name from tblTopicsToCategories TC, viewTopics T , tblCategory C where TC.TopicID = T.TopicID and TC. Categoryid= C.CategoryId and T.TopicName = '"+CMSContext.Posting.DisplayName +"' ORDER BY TC.SortOrder";
connection.Open();
System.Data.SqlClient.SqlCommand command=new System.Data.SqlClient.SqlCommand(commandString1,connection);
SqlDataReader dataReader1 = command.ExecuteReader();
while (dataReader1.Read())
{
CategoryId=dataReader1.GetSqlInt32 (0).ToString ();
CategoryName=dataReader1.GetString(2);
commandString2 = "SELECT PC.categoryID , C.name , S.county, P.programTitle FROM tblSession S, tblProgram P, tblProgramCategory PC, tblCategory C WHERE S.programId = P.programId and P.programID = PC.programID and PC.categoryID = C.categoryID and county='montgomery' and C.CategoryId ='"+CategoryId+"
SqlDataAdapter dataAdapter= new SqlDataAdapter(commandString2,connectionString);
DataSet dataSet=new DataSet();
dataAdapter.Fill(dataSet,"tblSession");
DataTable dataTable= dataSet.Tables[0];
Repeater1.DataSource=dataTable;
Repeater1.DataBind();
}
What happens here that for each value from the first query I need to have a separate display but in this case it is overwritten because I am using one repeater control.
Any suggestion?
I appreciate your help.
Regards,
Randall