Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 12, 2012 04:08 PM by sushanth009
Member
92 Points
281 Posts
Jun 12, 2012 02:42 PM|LINK
I'm trying to set index for my array values which i handle it in a class file.Below is my code
for (int iv = 0; iv <= (tempdata.Length - 1); iv++) { s1 += tempdata[iv].Name + "<br />"; }
On displaying the values are not displayed on individual row,instead it shows a<br/>b<br />c<br /> I need it to display as below
a
b
c
Contributor
2600 Points
484 Posts
Jun 12, 2012 02:47 PM|LINK
I am assuming you was setting 's1' to a html control . if so you need to use innerHtml property of the control ,to set 's1'
182 Points
110 Posts
Jun 12, 2012 02:48 PM|LINK
try to display the data in HTML area instead of TEXT area.
for example: showing the data in textbox.
try to show in div tag.
cheers..
How do i do that? I'm trying to get all the values of my array and display it.it's an silverlight application which refers to this class file.
6243 Points
1168 Posts
Jun 12, 2012 04:08 PM|LINK
Try Environment.NewLine
for (int iv = 0; iv <= (tempdata.Length - 1); iv++) { s1 += tempdata[iv].Name + Environment.NewLine ; }
srividhyavat...
Member
92 Points
281 Posts
Help on index array
Jun 12, 2012 02:42 PM|LINK
I'm trying to set index for my array values which i handle it in a class file.Below is my code
for (int iv = 0; iv <= (tempdata.Length - 1); iv++) { s1 += tempdata[iv].Name + "<br />"; }On displaying the values are not displayed on individual row,instead it shows a<br/>b<br />c<br /> I need it to display as below
a
b
c
Shellymn
Contributor
2600 Points
484 Posts
Re: Help on index array
Jun 12, 2012 02:47 PM|LINK
I am assuming you was setting 's1' to a html control . if so you need to use innerHtml property of the control ,to set 's1'
Smith Codexp...
Member
182 Points
110 Posts
Re: Help on index array
Jun 12, 2012 02:48 PM|LINK
try to display the data in HTML area instead of TEXT area.
for example: showing the data in textbox.
try to show in div tag.
cheers..
English Rat
Hi Buddy
srividhyavat...
Member
92 Points
281 Posts
Re: Help on index array
Jun 12, 2012 02:48 PM|LINK
How do i do that? I'm trying to get all the values of my array and display it.it's an silverlight application which refers to this class file.
sushanth009
Contributor
6243 Points
1168 Posts
Re: Help on index array
Jun 12, 2012 04:08 PM|LINK
Try Environment.NewLine
for (int iv = 0; iv <= (tempdata.Length - 1); iv++) { s1 += tempdata[iv].Name + Environment.NewLine ; }