在我的Web應用程序中,我編輯了個人資料頁面。在editprofile頁面他們是許多領域,如提交時從Form刪除未改變的輸入字段
Name : <input type="text" name="name"/>
Location : <input type="text" class="geolocation" name="location">
Birthdata : <input type="date" name="dob">
Profile Picture : <input type="file" name="photo"/>
我要發送回只有被編輯的字段的數據,而不是所有的領域。
您是使用標準的「提交」行爲還是通過web-services/wcf?對於WCF/webservices,過濾項目將遵循manoj的解決方案(存儲原始值並在包含值之前進行比較)。對於提交,您可能需要遵循smerny的解決方案(存儲原始值並刪除輸入標籤)。 – Richard
我使用正常的表單提交。 –