Click here to Skip to main content
15,897,704 members
Articles / Web Development / ASP.NET

Using JEditable Plugin as ASP.NET MVC3 jQuery Inline Editor

Rate me:
Please Sign up or sign in to vote.
4.86/5 (48 votes)
24 Jun 2012CPOL17 min read 162K   3.5K   132  
This article describes how you can implement inline editing in an ASP.NET MVC application using the jQuery Jeditable plug-in.
In this article, I will show you a jQuery alternative for content editable - the Jeditable plug-in. I will also explain how you can implement inline editing functionality in an ASP.NET MVC3 application using jQuery.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using JQueryEditableMVC.Models;

namespace JQueryEditableMVC.Controllers
{
    public class CompanyController : Controller
    {
        //
        // GET: /Company/

        public ActionResult Details()
        {
            return View(new Company()   {
                                            ID = 17,
                                            Name = "Gowi",
                                            Address = "Maxima Gorkog 2",
                                            Town = "Belgrade"
                                        });
        }

        public string UpdateLabel(string id, string value)
        {
            return value;
        }

        public string UpdateField(string id, string value, int CompanyId, string RecordType)
        {
            return value;
        }

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Program Manager Microsoft
Serbia Serbia
Graduated from Faculty of Electrical Engineering, Department of Computer Techniques and Informatics, University of Belgrade, Serbia.
Currently working in Microsoft as Program Manager on SQL Server product.
Member of JQuery community - created few popular plugins (four popular JQuery DataTables add-ins and loadJSON template engine).
Interests: Web and databases, Software engineering process(estimation and standardization), mobile and business intelligence platforms.

Comments and Discussions