I am binding some values to the TextBox using JavaScript. But During PostBack, the textbox values are cleared. So I used contentEditable=”false” in the TextBox property.So the above problem get solved.
But, Suppose if there is no records to bind the TextBox using Javascript, at that time I want to set the textbox property contentEditable=”true”. So we can enter some values. How to do this in the Code Behind file?
This is my TextBox Sourcode:
This is my JavaScript to assign the Value to the TextBox:
function SuggessionSelectedValues(obj, ctrlName)
{
if(ctrlName == "UCJobOrderNo")
{
document.getElementById('<%=txtD1.ClientID %>').value = obj[1];
}
}
I call this JavaScript function in One Dynamic Suggestion control.
We need to give like this: