public string GetEmployeerid()
String strConnection = ConfigurationManager.ConnectionStrings["MyConsString"].ConnectionString;
SqlConnection conn = new SqlConnection(strConnection);
SqlCommand cmd = new SqlCommand("select * from Employeertable ", conn);
You have written half the code. You should buy a book and read it, not take random suggestions from people. cmd.ExecuteQuery will return a dataset, which is a perfectly valid data source for a data driven control. If you need a string array, you need to pull the data you want out of the data set, but you should still have known how to run this SQL from the many, many articles that exist on this site and online.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)