Good Morning,
I'm currently working on a project which consists in using a foreach on a list which then I would like to create a new texbox for each of the items.
Also please note that I'm new to this so sorry if I haven't explained it properly.
When running the debugger it complains of the item having the same key when it comes around to create the second textbox. Which it would be referring to the the "txtBox".
Please see the snippet below:
foreach (var c in list)
{
TextBoxField txtBox = new TextBoxField("txtBox");
txtBox.IsRequired = true;
txtBox.IsReadOnly = true;
document.AcroForm.FormFields.Add(txtBox);
txtBox.Value = "abc";
editor.Position.Translate(0, 110);
editor.DrawWidget(txtBox, new System.Windows.Size (300, 100));
};
Thanks
Marco