After the ASP.NET front-end GridView binds the data source, it has already obtained the value in the data field. The front-end controls have bound the corresponding fields respectively. How can the front-end display display two query results side by side in each row?
As shown in the picture:
The current layout is like this, how can we display two in each row?
<p style="align-content:center;text-align:center">
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" HorizontalAlign="Center" PageSize="15" AutoGenerateColumns="False">
<Columns>
<asp:HyperLinkField DataTextField="KS_ZKZ" HeaderText="考生准考证号" DataNavigateUrlFields="KS_ZKZ" DataNavigateUrlFormatString="StuInfoDetail.aspx?KSZKZ={0}" />
</Columns>
</asp:GridView>
</p>
.net controls are a stumbling block that hinders programmers from designing. Things that can obviously be implemented using loops require a gridview, but it is troublesome to encapsulate p into a thing and expand it. It is recommended to use loops to implement it.