I am writing a program to fill Text Fields in a PDF that's loaded from memory. The PDF features a number of Text Fields, but also has some other types of Fields such as Check Boxes and Combo Boxes.
I am currently just using
Code:
PdfTextField currField = (PdfTextField)inForm.Fields[elementName];
currField.Value = new PdfString(elementValue);
to set the value of each text box, however if one of the other Fields, e.g a checkbox is chosen, then I will obviously get a cast exception. So how can I check that the AcroField is a TextBox before I set it's value?
Thanks, RBrNx