net.I在Visual Studio 2010中使用數據視圖進行設計.GridView和DetailsView運行時沒有問題。在FormView中我試圖用下面的代碼開發一個編輯模板:在ASP.net中更新formview
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
onselecting="SqlDataSource1_Selecting" SelectCommand="SELECT * FROM [student]"
UpdateCommand="Update student set [email protected], [email protected], [email protected], [email protected] where [email protected]" >
</asp:SqlDataSource>
我如下得到一個錯誤:
'ASP.default_aspx'
不包含'SqlDataSource1_Selecting'
的定義,並沒有擴展方法'SqlDataSource1_Selecting'
接受'ASP.default_aspx'
類型的第一個參數可以找到(是否缺少using指令或程序集引用?)
我該如何解決?
感謝哥們我刪除了那部分,現在它的工作正常。 – user2125727