c# - asp.net edit text and save it to database -


so got text in div box on page. want make editable , save changes button click.

i know how make text in div box editable how save changes database? , put it?

$("#bearbeiten").click(function() {         $("#beschreibung").attr("contenteditable", "true");)} 


to data use ajax , tried data , post database either did wrong or not right way post data.

var versionid = $(this).data("versionid");         $.ajax({             datatype: "json",             url: "api/beschreibung/gettext?xversionid=" + versionid,             type: "get" 


hope can me.

summarized: how data , how change it?

you should:

  1. create form;
  2. post data webserver (you can use jquery that, suggest simple form submit button;
  3. handle post data on server. seems using mvc. there tutorials all on internet;
  4. get posted data , send database. can use entity framework that, or ado.net.

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -