I got some code to create new buttons programmatically.
foreach (DataRow dtRow in dtTable.Rows)
{
string question_id = Convert.ToString(dtRow["QUESTION_ID"]);
string question_text = Convert.ToString(dtRow["QUESTION_TEXT"]);
var btn_system = new Button
{
ID = "btn_question" + question_id,
Text = question_text,
CssClass = "quest_buttons"
};
btn_system.Command += ButtonClick_Parent;
btn_system.CommandArgument = Convert.ToString(question_id);
}
Now I would like to add multiple CommandArgument
in line 12 of my code snippet. How can I do this from code behind?
Thanks in advance!