复选框列表到itextsharp列表到pdf字段

复选框列表到itextsharp列表到pdf字段

本文介绍了复选框列表到itextsharp列表到pdf字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

基本上,我有一个复选框列表,然后单击按钮,我要求itextsharp创建一个列表,然后根据检查的内容将其放在字段中.
这是我所拥有的:

Hi All

Basically, I have a checkbox list, and on button click, im asking itextsharp to create a list and put it in the field based on whats checked.
here''s what a i have:

using li = System.Web.UI.WebControls.ListItem;
using it = iTextSharp.text;

it.List intList = new it.List(it.List.UNORDERED);
foreach (li li in cblInterior.Items)
{
    if (li.Selected == true)
       {
           intList.Add(li.Text);

       }
}
pdfFormFields.SetField("InteriorText", intList);


但是,我在最后一行收到错误消息:"The best overloaded method match for ''iTextsharp.text.pdf.AcroFields.SetField(string, string)'' has some invalid arguments."

但是我无法说出我错过了什么. "intList.Add(li.Text)"是否已将其转换为字符串?


but, i get an error at the last line saying: "The best overloaded method match for ''iTextsharp.text.pdf.AcroFields.SetField(string, string)'' has some invalid arguments."

But I can''t tell what im missing. Doesnt "intList.Add(li.Text)" turn it into a string already? Is it a syntax problem with itextsharp?

推荐答案


这篇关于复选框列表到itextsharp列表到pdf字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 18:45