Wrox Programmer Forums
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 11th, 2007, 05:47 PM
Registered User
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to creative.programmer Send a message via Yahoo to creative.programmer
Default How to Add CheckBoxField in ASP.NET

Dear Programmers,

I need your help. I am developing a project in ASP.NET in which I am using VB.NET as Language. I want to add CheckBox in DataGrid. Even I am succeded in showing the checkbox in Datagrid but I am unable to give the user opportunity to select the checkboxes. The checkbox field directly checks or unchecks the checkbox by getting data from one of the column of my database. My database is in SQL Server 2000.
Please help me. I am also sending the scripting code below.

<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head2" runat="server">
    <title>CheckBoxField Example</title>
    <form id="form2" runat="server">

      <h3>CheckBoxField Example</h3>

      <asp:gridview id="AuthorsGridView"


          <asp:boundfield datafield="au_lname"
            headertext="Last Name"/>

          <asp:checkboxfield datafield="contract"



      <asp:sqldatasource id="AuthorsSqlDataSource"
        selectcommand="SELECT [au_lname], [au_fname], [address], [city], [state], [zip], [contract] FROM [authors]"
        connectionstring="server=localhost;database=pubs;i ntegrated security=SSPI"


please check the code and tell me where i am doing mistake so that i shall correct it. Please Remember that I am using Visual Studio 2005 as an editor to code ASP.NET.

If you solve the problem then please tell me on the ID below
I will be thankful to you.

Waiting for your reply.

One of your Programmer Friend,
Zeeshan Ahmad

Similar Threads
Thread Thread Starter Forum Replies Last Post
CheckBoxField in GridView ramuis78 ASP.NET 2.0 Basics 24 March 18th, 2010 07:57 PM
Video: Add some Atlas to your ASP.NET 2.0 jminatel ASP.NET 2.0 Professional 0 June 22nd, 2006 04:02 PM
Add asp.net page to asp project debdemoe Classic ASP Basics 0 August 17th, 2005 12:28 PM
how to add more than one form in asp.net alyeng2000 ASP.NET 1.0 and 1.1 Professional 2 July 19th, 2004 02:58 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.