0
I have found the solution for the stated problem...............it is working....
we can use this following sql query to resolve the problem....
cmd=new SqlCommand("SELECT "+ (DropDownList1.SelectedValue.ToString()) +".dbo."+ (CheckBoxList1.SelectedItem.ToString()) +".Name , "+(DropDownList1.SelectedValue.ToString()) +".dbo."+ (CheckBoxList1.SelectedItem.ToString()) +".Phone FROM "+(DropDownList1.SelectedValue.ToString()) +".dbo."+ (CheckBoxList1.SelectedItem.ToString())+" LEFT JOIN "+(DropDownList2.SelectedValue.ToString()) +".dbo."+ (CheckBoxList2.SelectedItem.ToString())+" ON "+(DropDownList1.SelectedValue.ToString()) +".dbo."+ (CheckBoxList1.SelectedItem.ToString()) +".Phone="+(DropDownList2.SelectedValue.ToString()) +".dbo."+ (CheckBoxList2.SelectedItem.ToString()) +".Phone",con);
Here "Name" and "Phone" are column names of the tables.