bruceypatel123
Member
- Joined
- Oct 19, 2010
- Messages
- 5
- Programming Experience
- Beginner
dim content as string
content = e.row.cells(3).text
content = content.Substring(0, (content.IndexOf(" ", 150) < 0 ? content.Length : content.IndexOf(" ", 150))) & "..."
it doesn't allow the ? and : in vb. Can you please write a similar code for this but in VB please?
I'm want the string to show until a space on the 150th character but if there is no space on the 150th character, the string continues until next space after the 150th character.
content = e.row.cells(3).text
content = content.Substring(0, (content.IndexOf(" ", 150) < 0 ? content.Length : content.IndexOf(" ", 150))) & "..."
it doesn't allow the ? and : in vb. Can you please write a similar code for this but in VB please?
I'm want the string to show until a space on the 150th character but if there is no space on the 150th character, the string continues until next space after the 150th character.