Problem formatting text

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,

I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:

lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?

Thanks
Mike
 
What si the type on Value?



Hi,

I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:

lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?

Thanks
Mike
 
--
Michael
What si the type on Value?



Hi,

I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:

lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?

Thanks
Mike
 
Public Sub addAccountToList(ByVal value() As System.Object)
lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

End Sub

--
Michael



What si the type on Value?



Hi,

I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:

lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?

Thanks
Mike
 
Did you try converting it to a string array?


Public Sub addAccountToList(ByVal value() As System.Object)
lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

End Sub

--
Michael



What si the type on Value?



Hi,

I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:

lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?

Thanks
Mike
 
Yes. Still doesn't work. The only spaces that I see are those between the parentheses.

--
Michael


Did you try converting it to a string array?


Public Sub addAccountToList(ByVal value() As System.Object)
lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

End Sub

--
Michael



What si the type on Value?



Hi,

I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:

lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?

Thanks
Mike
 
Ahh



Yes. Still doesn't work. The only spaces that I see are those between the parentheses.

--
Michael

lstChartAccounts.Items.Add(String.Format("{0,15} {1,50} {2,10} {3,10}",


try that.

Did you try converting it to a string array?


Public Sub addAccountToList(ByVal value() As System.Object)
lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

End Sub

--
Michael



What si the type on Value?



Hi,

I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:

lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))

I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?

Thanks
Mike
 
Back
Top