Sazzad Hossain

Sazzad Hossain

  • NA
  • 3
  • 5.2k

How to pass an Integer value with button_click eventhandeler

Sep 10 2013 7:25 AM
I have a dynamic button btnQuestionNum and a integer i,

btnQuestionNum= new Button();
btnQuestionNum.Text = Convert.ToString(i + 1);
btnQuestionNum.ID = i.ToString();
btnQuestionNum.Click += new EventHandler(btnDynamic); placeholder.Controls.Add(btnQuestionNum);

I want to pass the value of i when button btnQuestionNum is clicked.

Answers (1)