A rejoint le : 14 mai 2022

À propos

Sdc40 Yamatake Manual.epub amalmel




Search for: Retrieve links for All document downloads. - Google Docs Tips & suggestions for further reading: How to download a Google Doc? How to download a PDF from Google Docs? Uploading and downloading files in Google Drive? Google Drive more than just a file storage system? How can I download a doc from Google Docs? References: Google Docs - Official Google Support Site Google Drive - Official Google Support Site Q: Returning value from mvc controller This is my controller: public ActionResult AddUser() { UserRepository repository = new UserRepository(); return Json(repository.AddUser("admin", "admin"), JsonRequestBehavior.AllowGet); } And this is my JS method: function CreateUser() { $.ajax({ type: "GET", url: "AddUser", success: function (data) { alert("added"); } }); } After calling the AddUser method I need to return some result that will be called by the CreateUser method. I have tried to return this: return Json(repository.AddUser("admin", "admin"), JsonRequestBehavior.AllowGet); But the addUser method doesn't see it. How can I make it work? A: I am assuming you are using an ASP.NET MVC framework (in which case I don't think you want to use JSON, as that is strictly related to the AJAX capabilities of JavaScript.) Regardless, you can pass in your model to your controller method: public ActionResult AddUser(UserModel model) { UserRepository repository = new UserRepository(); return repository.AddUser(model.admin, model.admin); } So your JS would look like: function CreateUser() { $.ajax({





Sdc40 Yamatake Manual.epub amalmel

Plus d'actions