Reputation: 3588
I am using a multiline textbox for publishing a note but taking the content in a div through inner HTMl. like this
divMessageDescription.InnerHtml = dbreader["Message"].ToString();
but now for a particular group of people I want to make the read only property of this div as false..
Can I do this ???
Upvotes: 0
Views: 2470
Reputation: 66649
To make the div editable (read only = false) you use the contentEditable="true"
<div id="divMessageDescription" contentEditable="true">
click here to edit ...</div>
Upvotes: 1
Reputation: 49245
Why use div for text editing, you can use multi-line text box (textarea). Even for display purpose, you may use the same textbox with read-only set as true.
Upvotes: 1