RadioButtonList的分析器错误

时间:2017-01-26 09:01:04

标签: asp.net

我收到以下错误:

enter image description here

这是页面代码:

<form id="form1" runat="server">
<div>
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            Choose a Foreground (Text) Color:<br/>
            <asp:DropDownList ID="lstForeColor" runat="server" AutoPostBack="True" OnSelectedIndexChanged="LstForeColor_OnSelectedIndexChanged"></asp:DropDownList>
            <br/><br/>
            Choose a Background Color:<br/>
            <asp:DropDownList ID="lstBackColor" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstBackColor_OnSelectedIndexChanged"></asp:DropDownList>
        </asp:View>
        <asp:View ID="View2" runat="server">
            Choose a Border Style:<br/>
            <asp:RadioButtonList ID="lstBorder" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstBorder_OnSelectedIndexChanged" RepeatColumns="2"/>
            <br/>
            <asp:CheckBox ID="chkPictre" runat="server" AutoPostBack="True" OnCheckedChanged="chkPictre_OnCheckedChanged" Text="Add Deafult Picture"/>
        </asp:View>
        <asp:View ID="View3" runat="server">
            Choose a fint name:<br/>
            <asp:DropDownList ID="lstFontName" runat="server"AutoPostBack="True" OnTextChanged="lstFontName_OnTextChanged"/>
            <br/><br/>
            Enter the greeting text Below:<br/>
            <asp:TextBox ID="txtGreeting" runat="server" AutoPostBack="True" OnTextChanged="txtGreeting_OnTextChanged" TextMode="MultiLine"></asp:TextBox>
        </asp:View>
    </asp:MultiView>
</div>
</form>

我尝试更改ID,删除一些属性,添加结束标记,但没有一个有效,我想知道为什么我会收到此错误

1 个答案:

答案 0 :(得分:0)

lstFontName中的属性之间缺少空格。变化

<asp:DropDownList ID="lstFontName" runat="server"AutoPostBack="True" OnTextChanged="lstFontName_OnTextChanged"/>

<asp:DropDownList ID="lstFontName" runat="server" AutoPostBack="True" OnTextChanged="lstFontName_OnTextChanged"/>

runat="server"AutoPostBack="True"

之间必须有空格