I’ve got this code here:
SqlCommand CodeStatus = new SqlCommand(SQL, DB); DB.Open(); Reader = CodeStatus.ExecuteReader(); FormView1.DataSource = Reader; FormView1.DataBind(); DB.Close();
It works with a gridview, which then displays the data, but with this formview it doesn’t display the data. Why not? The default mode is read only, which should just display the data..right?
MSDN defines FormvView as ‘A FormView displays the values of a single record from a data source using user-defined templates.’
So you will need to look at a few things-