$(document).ready(function () {
// Get the multiline TextBox element
var textBox = $("#yourTextBoxId");
// Bind the input event to the TextBox
textBox.on("input", function () {
var lines = textBox.val().split("\n");
var maxLength = 10; // Set the maximum character limit per line
for (var i = 0; i < lines.length; i++) {
// If the current line exceeds the maximum character limit
if (lines[i].length > maxLength) {
var truncatedLine = lines[i].substr(0, maxLength);
lines[i] = truncatedLine;
}
}
// Update the TextBox value with the modified lines
textBox.val(lines.join("\n"));
});
});