mongodb にはhttp インターフェイスがあるため、たとえば$.ajax を介して直接更新要求を mongodb に送信するか、ajax 要求を自分の handlers/pages/controllers に送信して、更新に通常どおり mongo-csharp ドライバーを使用できます。あなたの選択をしてください...
ページの最初に jquery を含めます。「更新」ボタンで、ハンドラーをクリックして次のようなコードを貼り付けます(ajaxリクエストを送信するため):
$.ajax({
type: "POST",
url: "SomePage.aspx",
data: "name=John&location=Boston",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
ページ内(ただし、http hadlers ajax 処理を使用する方がよいと思われます):
public void Page_Load(object sender, EventArgs e)
{
var name = HttpContext.Current.Request["name"];
var location = HttpContext.Current.Request["location"];
var item = new Item(){Name = name, Location = location};
//here update or insert your item, do what you want
Db.Repository.Updater(item)
}