Hi, I have created several sites in VB, but now need to create / convert a few more to C#.
I want to link a grid view to a dataset that I have, I have done it many times in vb but never in c#.
I have set up a data connection string in the web config which works as I have tested it against an SQLdatasource component embeded into the page.
I want to do this more programatically in the source so I have taken some of my VB script and placed it trough a convertor. and got out the other side the script attached. However I get an issue
"Non-invocable member 'System.Configuration.Conf
ings' cannot be used like a method." when I try to bind to the gridview.
protected void Gridview1_Set()
string connStr = ConfigurationManager.ConnectionStrings("acVitaConnectionString").ConnectionString;
SqlConnection con = new SqlConnection(connStr);
SqlCommand SQLCmd = new SqlCommand("SPTopProducts", con);
SQLCmd.CommandType = CommandType.StoredProcedure;
GridView1.DataSource = SQLCmd.ExecuteReader();
catch (Exception ex)