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:
- create
form
; - post data webserver (you can use jquery that, suggest simple
form
submit button; - handle post data on server. seems using mvc. there tutorials all on internet;
- get posted data , send database. can use entity framework that, or ado.net.
Comments
Post a Comment