Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do I Trim a jQuery variable to 500 text characters starting from the left to 500?

$("#<%= TextBox2.ClientID %>").trim(500);???
Posted

Something like this perhaps?

JavaScript
$("#<%= TextBox2.ClientID %>").substring(0,500);


Hope it helps.
 
Share this answer
 
C#
$(document).ready(function () {
    var str = 'FDKJFHDSIPUFGSIDPGBPIJGFUPFDSBGJFKD;NGFDPOUGHDPFSGSFDGOPFUFDHIGHFDGIHFSDGISFDHIUIUIUIUHSOIHSHUReverse';
    if (str.length > 15) str = str.split('').reverse().join('').substring(0, 15);
    alert(str);

});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900