Torna al Thread

decimal maxWidth = 30; int charToCut = 3; if (label1.Size.Width > maxWidth) { label1.Text = label1.Text.Replace(label1.Text.Substring(label1.Text.Length - charToCut, charToCut), string.Empty) + "..."; }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5