I have following cshtml view page with div sections
@model IEnumerable<int>
@{
ViewBag.Title = "Template";
}
<!DOCTYPE html>
<html>
<head>
<title>Create a Template</title>
</head>
<body>
<div>Bank Brochure</div>
<div>Solution by ggg.</div>
</body>
</html>
I want to make this cshtml page div sections editable ,how can I do this
You need to be more specific.
if 'Editable' means Html Editable, you can consider using an opensource WYSIWYG editor instance like CKEditor.
If you want to just show your content normally, but want to make that div editable, you can use the
contenteditable="true"
attribute for your div:If all you want is to provide an editable text area, you can use MVC's helper functions to do that:
You can check the MSDN reference to see how to properly use this.
May it will helps you
Update:
To get the editable div value in JQuery and JavaScript