I am setting the value of summernote code to hidden field but in code behind hidden field returns empty string
Javascript code
$("#<%= txtQuestion.ClientID %>").on('summernote.blur', function () {
debugger;
let a = $('#<%= txtQuestion.ClientID %>').summernote('code');
document.getElementById("<%= HiddenField1.ClientID %>").innerText = a;
console.log(a);
});
Code Behind
string a = HiddenField1.Value;
You're setting innerText
, you should set value
.