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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Apr 1, 2013, 8:08 PM EDT
<%@ 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
Jignesh TrivediRank #16 · 50.3K reputationPosted Apr 1, 2013, 8:24 PM EDT
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.