Created
March 10, 2012 13:25
-
-
Save jsakamoto/2011416 to your computer and use it in GitHub Desktop.
GDataDB を使って、ASP.NET MVC3 アプリから Google Docs スプレッドシートへ書き込みを行う
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GDataDB を NuGet Package Manager を使ってプロジェクトに追加しておくこと。 | |
[HttpPost] | |
public ActionResult Index(Attendee attendee) | |
{ | |
// ここでスプレッドシートへ書き込み | |
var gdbclient = new GDataDB.DatabaseClient("(user name)", "(password)"); | |
var db = gdbclient.GetDatabase("Attendees"); | |
var tbl = db.GetTable<Attendee>("Sheet1"); | |
tbl.Add(attendee); | |
return RedirectToAction("Complete"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment