日期:2014-05-20  浏览次数:20443 次

“DropDownList1”有一个无效 SelectedValue
提示错误:“DropDownList1”有一个无效   SelectedValue
代码:
    <asp:TemplateField   HeaderText= "unit "   SortExpression= "unit ">
                                <EditItemTemplate>
                                        <asp:DropDownList   ID= "DropDownList1 "   runat= "server "   SelectedValue= ' <%#   Bind( "unit ")   %> '
                                                Width= "75px " ">
                                                <asp:ListItem   Value= "PCS "     Selected=True     > PCS </asp:ListItem>
                                                <asp:ListItem   Value= "DZ "   > DZ </asp:ListItem>
                                        </asp:DropDownList>
                                </EditItemTemplate>
                                <ItemTemplate>
                                        <asp:Label   ID= "Label1 "   runat= "server "   Text= ' <%#   Bind( "unit ")   %> '> </asp:Label>
                                </ItemTemplate>
                        </asp:TemplateField>

------解决方案--------------------
<asp:DropDownList ID= "DropDownList1 " runat= "server " SelectedValue= ' <%# Bind( "unit ") %> '
Width= "75px " ">
<asp:ListItem Value= "PCS " Selected=True > PCS </asp:ListItem


?????!!!!!!!!!!!!!!