Look at the error message:
Quote:
Name is neither a datacolumn nor a datarelation for table
Then look at your code:
SqlCommand cmd = new SqlCommand("select name from registeruser where dept='Sales'", con);
...
ddlprod.DataTextField = "name";
ddlprod.DataValueField = "name";
...
ddlprod.SelectedValue = dr["name"].ToString();
Now check your DB: does it have a column called "name" in the table "registeruser"? If it does, use the debugger to check the DataRowView and see exactly what cells it contains. Is "name" there?
The error message says one of them doesn't.