我正在从表中读取所有字符串值并将其添加到数组中,如下所示。
da2.Fill(ds, "DNAiusTwitter_Table");
int counts = ds.Tables[0].Rows.Count;
for (int i = 0; i < counts; i++)
{
names[i, 0] = ds.Tables[0].Rows[i][3].ToString();
}
如何获取字符串append = 'name1','name2','name3','name4';
如何将这些值传递给以下代码:
for (int i = 0; i < 1; i++)
{
HtmlGenericControl scriptTagLinks = new HtmlGenericControl("script");
scriptTagLinks.Attributes["type"] = "text/javascript";
string scrip1 = "$(function () {$(\"[src='" + names[i, 0] + "']\"" + ").pinit();});";
var scrip = "var tweetUsers=['" +append + "'," + "'" + splitted[3]+"']";
scriptTagLinks.InnerHtml = scrip;
this.Controls.Add(scriptTagLinks);
}