Posted on: 4/9/2011 8:10:00 AM | Views : 505

I want to rightPad the concatinated string of listitem while adding it to the
listbox
when i see it in debug mode the string was rightpadded but after executing the
listitem of listbox is not right padded
Please let me know how to rightpad the listitem strings in listbox for each row
with specific length
below is the code
string strSName = "123";
        string strSNo = "4563455";
        string strGender = "4566";
        ListBox1.Items.Clear();
      
             
        ListItem li = new ListItem();
        li.Text = strSName.PadRight(20, ' ') + strSNo.PadRight(20, ' ') +
strGender.PadRight(20, ' ');
    &n ...

Go to the complete details ...