データテーブルからインポートされた異なる値を表示する3つの文字列ビルダーがあります。現在、ページがレンダリングされるとき、私は "binType"に3つの同じ値しか得ないので、 "date"などはbinType値を持ちます。誰かが私がここで間違っていることを教えてもらえますか?同じ値を返す文字列ビルダー
if (binForm.Rows.Count != 0)
{
int rowCounter = binForm.Rows.Count;
int increment = 0;
while (rowCounter > 0)
{
tableData.Append("<td>" + binForm.Rows[increment]["binType"].ToString() + "</td>");
tableData2.Append("<td>" + binForm.Rows[increment]["binColour"].ToString() + "</td>");
tableData3.Append("<td>" + binForm.Rows[increment]["date"].ToString() + "</td>");
increment++;
rowCounter--;
}
}
literal.Text = tableData.ToString();
literal2.Text = tableData.ToString();
literal3.Text = tableData.ToString();
connect.Close();
}
tableData.ToStringは()literal.Text、literal2.Textとliteral3.Text – alnaji