Does anyone know why it looks like this?
Resolution:
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingMySql.Data.MySqlClient;usingSystem.Data;namespaceMySqlServerDemo{publicpartialclassWebForm1:Page{protectedvoidPage_Load(objectsender,EventArgse){BindData();}publicvoidBindData(){MySqlConnectioncon=newMySqlConnection("server=localhost;user id=root;database=test");
con.Open();
MySqlCommand cmd = new MySqlCommand("select * from person", con);
MySqlDataAdapter adp = new MySqlDataAdapter(cmd);
DataSet ds = new DataSet();
adp.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
cmd.Dispose();
con.Close();
}
}
}