()在浏覽器中運行該頁面在GridView控件中嘗試單擊Edit並修改對手的名字如圖所示

現在在DetailsView控件中完成相同的操作如圖所示

操作回顧
同樣ASPNET 通過將更新的功能包含在數據控件中從而使這一切變得非常簡單為了激活數據源控件的更新功能需要勾選相關復選框以包含INSERTUPDATE和DELETE命令這目前已超出了您的需要(雖然本章後面您會用到INSERT和DELETE命令)VWD為應用更新功能的數據源控件做了兩個修改首先是添加UpdateCommand命令如下所示
<asp:sqldatasource ID=SqlDataSource
UpdateCommand=UPDATE [Fixtures] SET [FixtureDate] = @FixtureDate
[FixtureType]=@FixtureType [GoalsFor]=@GoalsFor [GoalsAgainst]=@GoalsAgainst
[Notes]=@Notes [Opponents] = @Opponents
WHERE [FixtureID] = @Original_FixtureID
[] [] [] [] [] []
From:http://tw.wingwit.com/Article/program/net/201311/14652.html