简体   繁体   中英

Literal Control <li> inline edit

i would like to edit text and save it, but inline, this is, the text is uploaded to a literal control in the server, but now i would like to edit the text inline.

User Control - ASP.NET

...

+ "<td>" + status + "</td>"

...

load.Controls.Add(new LiteralControl(_str));

  • _str is a string with the literal control;

  • status is the string wich as the data from the database.

    状态

    my idea is to click in the numbers and edit. how can i do it?

  • You could render the status as a disabled borderless textbox (input="text"). Meaning that it would seem as plain text to the user. When the user clicks on it, you would change the textbox style to make it visible (with borders) and editable (focusable, enabled). The saving process of that information could be made when the user leaves the textbox (onblur event), making an AJAX request to the server or just when the user clicks on a save button (assuming it could exist).

    The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

     
    粤ICP备18138465号  © 2020-2024 STACKOOM.COM