自定义重复toshow复选框 [英] customize repeator toshow checkbox
本文介绍了自定义重复toshow复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
i我正在电影票预订网站上工作我需要通过使用转发器来显示我正在考虑的座位,转发器必须显示指定的复选框的数量在aspx.cs页面中,您可以帮我解决这个问题
hello
i am working on a movie ticket booking site i need to show the seats i am thinking of doing that by using a repeater, the repeater has to show the number of check box that are specified in the aspx.cs page can u pleas help me out with this
推荐答案
<div>
<asp:repeater runat="server" id="rptCheckBox" xmlns:asp="#unknown">
<itemtemplate>
<input type="checkbox" style="float:left" />
<div style=" width:100%; clear:both;"></div>
</itemtemplate>
</asp:repeater>
</div>
string[] seats = new string[10]; // your seats! , this is your data source ! you can also use database or data table or ...
rptCheckBox.DataSource = seats;
rptCheckBox.DataBind();
这篇关于自定义重复toshow复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文