also how to make the checkbox text stays the same line as checkbox...
Tq so much..

OnCheckedChanged="chkSelectAllGeneral_CheckedChanged" />
protected void chkSelectAllGeneral_CheckedChanged(object sender, EventArgs e)
{
foreach (GridViewRow rowItem in GridView3.Rows)
{
CheckBox chkgeneral = (CheckBox)(rowItem.Cells[0].FindControl("chkgeneral"));
chkgeneral.Checked = ((CheckBox)sender).Checked;
}
}
Satyapriya NayakPosted Apr 3, 2013, 1:12 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 con As New SqlConnection(strConnString)
Dim str As String
Dim com As SqlCommand
Dim sqlda As SqlDataAdapter
Dim ds As DataSet
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
con.Open()
str = "select * from student"
com = New SqlCommand(Str, con)
Dim reader As SqlDataReader
reader = com.ExecuteReader()
GridView1.DataSource = reader
GridView1.DataBind()
con.Close()
End Sub
End Class