Hi guys,
I'm creating 3 dropdown boxes. While page load i want to set selecteditems from an object.
My problem is It sets for the all 3 at the same time with the latest index.
It sets but it sets the same value for the all dropdowns which are created with for loop and they are in same array.
QTYPlaceHolder.Controls.Clear();
LiteralControl productType = new LiteralControl();
jadbook = getJADBookFromSession();
DropDownList[] dds = new DropDownList[book.ProductTypes.Count];
TextBox[] tbs = new TextBox[book.ProductTypes.Count];
LiteralControl[] lts = new LiteralControl[book.ProductTypes.Count];
if (jadbook.JADGRBooking[0].JADGRDelivery[0].VehicleNum != null)
{
LicenseBox.Text = jadbook.JADGRBooking[0].JADGRDelivery[0].VehicleNum;
}
for (int i = 0; i < ...
Go to the complete details ...