how can I do that??
And how to design that table that it looks excellent in the website and nobody can say that this is only a table..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Apr 2, 2013, 12:24 AM
hi,
internally gridview is also use Table.
so it doesn't matter whether you use table or gridview.
and also look and fill of table is depend upon what CSS is applied on it.
please refer
http://coding.smashingmagazine.com/2008/08/13/top-10-css-table-designs/
http://pythoughts.com/table-style-css/
hope this will help you.
Satyapriya NayakPosted Apr 2, 2013, 12:08 AM
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
Default.aspx.vb code
Imports System.Data.SqlClient
Imports System.Data
Partial Class _Default
Inherits System.Web.UI.Page
Dim strConnString As String = System.Configuration.ConfigurationManager.ConnectionStrings.Item("ConnectionString").ToString()
Dim sqlda As SqlDataAdapter
Dim com As SqlCommand
Dim ds As DataSet
Dim dt As DataTable
Dim str As String
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim con As New SqlConnection(strConnString)
Try
con.Open()
str = "select * from student "
com = New SqlCommand(str, con)
ds = New DataSet
sqlda = New SqlDataAdapter(com)
sqlda.Fill(ds, "student")
dt = ds.Tables("student")
For i = 0 To dt.Rows.Count - 1
Dim tr As New TableRow
For j = 0 To dt.Columns.Count - 1
Dim tc As New TableCell
tc.Text = dt.Rows(i).ItemArray(j)
tr.Cells.Add(tc)
Table1.Rows.Add(tr)
Next
Next
con.Close()
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub
End Class