当前位置: 代码迷 >> ASP.NET >> RadioButtonList莫名其妙的有关问题
  详细解决方案

RadioButtonList莫名其妙的有关问题

热度:8711   发布时间:2013-02-25 00:00:00.0
RadioButtonList莫名其妙的问题
前台aspx文件
HTML code
<asp:RadioButtonList ID="rblCateg " runat="server"></asp:RadioButtonList>


后台CS文件
C# code
            ListItem ite4 = new ListItem("绘图软件保存文档格式", "1");            ListItem ite5 = new ListItem("PDF扫描文件格式", "2");            ListItem ite6 = new ListItem("word保存工艺文件格式", "3");            rblCateg.Items.Add(ite4);            rblCateg.Items.Add(ite5);            rblCateg.Items.Add(ite6);

调试后显示:
HTML code
“/”应用程序中的服务器错误。--------------------------------------------------------------------------------分析器错误 说明: 在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。 分析器错误消息: “rblCateg ”不是有效标识符。源错误: 行 32:                     </td>行 33:                     <td>行 34:                         <asp:RadioButtonList ID="rblCateg " runat="server">行 35:                         </asp:RadioButtonList>行 36:                     </td> 源文件: /Add_Proe.aspx    行: 34 


------解决方案--------------------------------------------------------
<asp:RadioButtonList ID="rblCateg " runat="server">
</asp:RadioButtonList>

id后面多了个空格