コード例 #1
0
        //
        // GET: /First/Edit/5
        public ActionResult Edit(int id)
        {
            var model = new Models.FirstModel()
            {
                Id       = 1,
                FullName = "Karcsi",
                Address  = "Hosszú utca 1."
            };

            return(View(model));
        }
コード例 #2
0
        public ActionResult Edit(int id, Models.FirstModel model)
        {
            try
            {
                // TODO: Add update logic here

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }