我想添加一个rsionbuttonlist到我的ascx网页控件..我不断收到一个错误,将radionbuttonlist放入标签中。有没有解决的办法?将radiobuttonlist添加到ascx
"
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="step2.ascx.cs" Inherits="ascx_step2" %>
<div id="step2" runat="server">
<asp:RadioButtonList id="answers" runat="server">
</asp:RadioButtonList>
<div>
"
在后面的代码
:
ListItem item = new ListItem("a", "a")
answers.Items.Add(item);
错误:
控制 “ctl_00 ...” 类型的单选按钮必须放在一个窗体标记内与RUNAT =服务器
你可以发布你的标记和确切的错误消息你得到? – 2010-08-06 09:11:02
如果错误出现在运行时,请确保您正确地将控件包含在包含页面中。 – brumScouse 2010-08-06 09:59:29
!并且在标记中有适当的结束标记。 – brumScouse 2010-08-06 10:04:57