Add items in listbox control

Posted by Rajni.Shekhar under ASP.NET category on | Points: 40 | Views : 1738
// Create a string of array
string[] arrString = new string[3];

//assign values in array
arrString ={"Text1", "Text2", "Text3"};

// Add the array items to the list box.
for (int iIndex = 0; iIndex <= ListContents.Length - 1; iIndex++)
ListBox1.Items.Add(arrString [iIndex]);

Comments or Responses

Login to post response