【发布时间】:2015-06-12 14:56:11
【问题描述】:
我正在 Visual Studio 2013 上开发一个 ASPX 网页,我有以下代码:
<div id="Q1" style="width: 100%; text-align:justify">
<div style="float: left; width: 70%; align-items: center; background-color:rgba(99, 99, 99, 0.40); padding-top: 5px;padding-left: 5px;padding-bottom: 5px;padding-right: 5px;">
<asp:Label ID="LabelM12" runat="server"></asp:Label>
</div>
<div style="float: left; width: 25%; text-align:center; align-items:center">
<asp:RadioButtonList ID="RadioButtonListM12" runat="server" RepeatDirection="Horizontal" RepeatLayout="Table" onclick="ShowTxt('1');">
<asp:ListItem Text = "Yes" Value = "Yes"></asp:ListItem>
<asp:ListItem Text = "No" Value = "No"></asp:ListItem>
<asp:ListItem Text = "NA" Value = "NA"></asp:ListItem>
</asp:RadioButtonList>
</div>
</div>
我需要建立一个检查清单,将上面的代码重复 67 次!
如何从后面的 C# 代码创建完整的 div id="Q1" 内容?,例如:
for(int i = 0; i < 67; i++)
{
//Code to generate the div id="Q1" content
}
希望你能帮助我,在此先感谢!
【问题讨论】:
标签: c# html asp.net c#-4.0 code-behind