I want to display data in my own format from Mysql database connecting through ASP.NET. Currently I'm using MySQLDataGrid to display values in table format.
My code is
myConnection = New MySqlConnection("server=localhost; user id=root; password=''; database=test; pooling=false;")
strSQL = "SELECT * FROM tablename;"
myDataAdapter = New MySqlDataAdapter(strSQL, myConnection)
myDataSet = New Dataset()
myDataAdapter.Fill(myDataSet, "mytable")
MySQLDataGrid.DataSource = myDataSet
MySQLDataGrid.DataBind()
and asp code is:
<asp:DataGrid id="MySQLDataGrid" runat="server" />
its displaying all columns in Grid format. But i actually wanted to display in HTML table format with some included/exclude fields. like below.
UserName : City : Address: etc...
Can I have a simple example code on how to do it?