Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7914633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:11:11+00:00 2026-06-03T14:11:11+00:00

I have limited knowledge on VB coding. I am now creating a system which

  • 0

I have limited knowledge on VB coding. I am now creating a system which allow customer to select exhibition event and booth number they want and next reserved which day they want to rent.

By default, in GridView control can add checkbox Field but it only generate 1 checkbox for 1 row of data.

As state in the title, I have no idea how to generate the checkboxes for every field in database call D1,D2,D3,D4,D5,D6 and D7, each carry value 0 by default.
Now I want every single field have a checkbox to allow customer select which day they want to reserve and retrieve their checked value to stole into corresponding D1-D7 field, checked value will update value 0 to 1.

Next, how should I coding to store the checked value into database? in default.aspx or default.aspx.vb?

Or any other suggestion to generate checkbox instead of using gridview?

The default view using GridView

enter image description here

What I want

enter image description here

My coding:

    <%@ Page Language="VB" MasterPageFile="~/MasterPageMember.master" AutoEventWireup="false" CodeFile="member_view_event_list.aspx.vb" Inherits="member_view_event_list" title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">



    <style type="text/css">
        .style8
        {
            width: 46px;
        }
        .style9
        {
        }
        .style10
        {
            width: 86px;
        }
    </style>



    </asp:Content>

<asp:Content ID="ContentPlaceHolder2" runat="server" 
    contentplaceholderid="ContentPlaceHolder2">



    <table width="80%">
        <tr><td class="style10">&nbsp;</td><td class="style8">&nbsp;</td><td>&nbsp;</td></tr>
        <tr><td class="style10">
            <asp:Label ID="Label1" runat="server" Text="Select Event:"></asp:Label>
        </td><td class="style8">
            <asp:DropDownList ID="ddlEventList" runat="server" 
                DataSourceID="SqlDataSourceEvent" DataTextField="eventTitle" 
                DataValueField="eventID" AutoPostBack="True" Width="200">

            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSourceEvent" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>" 
                SelectCommand="SELECT DISTINCT [eventTitle], [eventID] FROM [booth_eventinfo]">
            </asp:SqlDataSource>
        </td><td>
                &nbsp;</td></tr>


        <tr><td class="style10">
            <asp:Label ID="Label2" runat="server" Text="Select Booth:"></asp:Label>
            </td><td class="style8">
            <asp:DropDownList ID="ddlBoothList" runat="server" 
                DataSourceID="SqlDataSourceBooth" DataTextField="boothAlias" 
                DataValueField="boothID" AutoPostBack="True" Width="200">

            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSourceBooth" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>" 
                SelectCommand="SELECT [boothAlias], [boothID] FROM [booth_eventinfo] WHERE ([eventID] = @eventID)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlEventList" Name="eventID" 
                        PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
            </td><td>
                 </td></tr>


        <tr><td class="style10">
            &nbsp;</td><td class="style8">
                &nbsp;</td><td>
                 &nbsp;</td></tr>


        <tr><td class="style9" colspan="3">

            <asp:GridView ID="GridViewDay" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" DataSourceID="SqlDataSourceDay" ForeColor="#333333" 
                GridLines="None">
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <Columns>
                    <asp:BoundField DataField="D1" HeaderText="Day1" SortExpression="D1" />
                    <asp:BoundField DataField="D2" HeaderText="Day2" SortExpression="D2" />
                    <asp:BoundField DataField="D3" HeaderText="Day3" SortExpression="D3" />
                    <asp:BoundField DataField="D4" HeaderText="Day4" SortExpression="D4" />
                    <asp:BoundField DataField="D5" HeaderText="Day5" SortExpression="D5" />
                    <asp:BoundField DataField="D6" HeaderText="Day6" SortExpression="D6" />
                    <asp:BoundField DataField="D7" HeaderText="Day7" SortExpression="D7" />
                </Columns>
                <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSourceDay" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>" 
                SelectCommand="SELECT [D1], [D7], [D6], [D5], [D4], [D3], [D2] FROM [booth_eventinfo] WHERE ([boothID] = @boothID)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlBoothList" Name="boothID" 
                        PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
            </td></tr>


        <tr><td class="style10">
            &nbsp;</td><td class="style8">
                <asp:CheckBox ID="CheckBox1" runat="server" />
            </td><td>
                &nbsp;</td></tr>


</table>

</asp:Content>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:11:12+00:00Added an answer on June 3, 2026 at 2:11 pm

    You need to change your ‘BoundField’ to a ‘TemplateField’ for each CheckBox control you desire. The code example below shows you how to do this. Note the binding expression syntax for your DataField value:

    <asp:TemplateField HeaderText="Day1" SortExpression="D1" HeaderStyle-HorizontalAlign="Center">
      <ItemTemplate>
         <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("D1") %>' />
      </ItemTemplate>
    </asp:TemplateField>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a client which makes a limited number of concurrent web requests. I
I have very limited coding knowledge of OpenGL/Glut. I'm supposed to build house and
Excuse my ignorance. My knowledge of regular expressions is extremely limited. I have the
I have a query limited by a date range: select * from mytable where
I have limited knowledge of php and mysql, I am trying to learn it
Since I still have a limited knowledge of LINQ, I figured I would ask
I'm new to design patterns, and thus have a limited knowledge of what all
I'm specificaally a photoshop web designer and have a limited knowledge of xaml. I'm
I have limited knowledge of Java-based technologies, and for business enforced reasons, I may
I have very limited knowledge of C#. My goal is to provide a C++

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.