String.Format --- Listbox formatting issues

dallan

New member
Joined
Feb 22, 2005
Messages
1
Programming Experience
1-3
I know and have tested (to double-check) that the following code works in a windows application form:

Dim strFmt As String = "{0,20}{1,-20}{2,-20}{3,-20}{4,-20}"
ListBox1.Items.Add(String.Format(strFmt, "COMPANY", "LOCATION", "DNS EXPIRY", "ISP EXPIRY", "CAREPACK EXPIRY"))

All of the strings are evenly spread out in the listbox..

For some reason unknown to me, this same code does not have the same effect in a web project. All the strings are jumbled together. I've made sure that the font is Courier yet it does nothing. Does anyone know why or have a possible fix?
 
Top Bottom