【发布时间】:2016-06-24 09:55:55
【问题描述】:
我是 Asp.net 和 C# 的新手,但我需要帮助我的老板设计一些 Web 表单。 下面是我设计一个大型网络表单供用户输入帐户并单击复选框的代码。如何让人们点击第一个复选框,然后第二个复选框也会被选中?
请告诉我什么样的问题可以帮助您理解我想要完成的任务。谢谢!
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="Service_Solution" %>
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<th colspan="30">Key Account Desk Service Solutions</th>
<tr>
<th style="width:0px"></th>
<th></th>
<th></th>
<th colspan="4">Shipment Monitoring</th>
<th colspan="2">Shipment Tracing</th>
</tr>
<tr>
<th></th>
<th class="auto-style8">Customer Name/Location</th>
<th class="auto-style8">Account Number</th>
<th class="auto-style8">100% Real Time Proactive Monitoring through QCC and QSMS</th>
<th class="auto-style8">100% Proactive Monitoring through NPTS</th>
</tr>
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="txtNo" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CB1" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CB2" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
【问题讨论】:
标签: c# asp.net gridview checkbox conditional