Good Day,
I'm trying to keep a loop and reuse it.
This is the code:
#region Facilities
loopTemplate = template.GetLoop("Facilities");
droptemp = databaseobj.GetDroplistFacilities();
for (int i = 0; i < droptemp.idvalue.Count; i++)
{
loopTemplate.SetTag("Facility.Code", droptemp.idvalue[i].ToString());
loopTemplate.SetTag("Facility.Text", droptemp.textvalue[i].ToString());
loopTemplate.CommitLoop();
}
#endregion
Getloop allow me create a loop in that template, but I need run that code just only one time and avoid to call the data base again.
Keep "loopTemplate" and then use it in other templates is a good idea.
How can I reuse loops in other templates?
Thank you!