日期:2014-05-18  浏览次数:20533 次

使用vs2005将一个dataview绊定数据源,删除出错,提示必须声明变量?
<form   id= "form1 "   action= " "   method= "post "   runat= "server ">
        <asp:GridView   ID= "GridView1 "   runat= "server "   AllowPaging= "True "   AllowSorting= "True "
                BackColor= "White "   BorderColor= "#CC9966 "   BorderStyle= "None "   BorderWidth= "1px "
                CellPadding= "4 "   DataSourceID= "SqlDataSource1 "   AutoGenerateColumns= "False "   DataKeyNames= "id ">
                <FooterStyle   BackColor= "#FFFFCC "   ForeColor= "#330099 "   />
                <Columns>
                        <asp:CommandField   ShowDeleteButton= "True "   />
                        <asp:BoundField   DataField= "id "   HeaderText= "id "   InsertVisible= "False "   ReadOnly= "True "
                                SortExpression= "id "   />
                        <asp:BoundField   DataField= "Province "   HeaderText= "Province "   SortExpression= "Province "   />
                        <asp:BoundField   DataField= "LearningCenter "   HeaderText= "LearningCenter "   SortExpression= "LearningCenter "   />
                        <asp:BoundField   DataField= "Xxiao "   HeaderText= "Xxiao "   SortExpression= "Xxiao "   />
                        <asp:BoundField   DataField= "Pci "   HeaderText= "Pci "   SortExpression= "Pci "   />
                        <asp:BoundField   DataField= "Cci "   HeaderText= "Cci "   SortExpression= "Cci "   />
                        <asp:BoundField   DataField= "ZHye "   HeaderText= "ZHye "   SortExpression= "ZHye "   />
                        <asp:BoundField   DataField= "Name "   HeaderText= "Name "   SortExpression= "Name "   />
                        <asp:BoundField   DataField= "Sex "   HeaderText= "Sex "   SortExpression= "Sex "   />
                        <asp:BoundField   DataField= "Certificate "   HeaderText= "Certificate "