title: sending data to event handler when the event is called programmatically
body: <pre><code> protected void Page_Load(object sender, EventArgs e)
      {
  
      Team T = new Team();
      string[] TLeaders = T.GetAllTeamLeaders(Session["USER_EMAIL"].ToString(), Session["ProjectID"].ToString());
      for (int i = 0; i &lt; TLeaders.Length; i++)
      {
          System.Web.UI.HtmlControls.HtmlGenericControl createDiv =new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");
  
          createDiv.Style.Add(HtmlTextWriterStyle.BorderStyle, "Solid");
          createDiv.Style.Add(HtmlTextWriterStyle.BorderColor, "lightblue");
          createDiv.Style.Add(HtmlTextWriterStyle.BorderWidth, "1px");
          createDiv.Style.Add(HtmlTextWriterStyle.Height, "100px");
          createDiv.Style.Add(HtmlTextWriterStyle.Width, "1350px");
          createDiv.Style.Add(HtmlTextWriterStyle.MarginTop, "20px");
          createDiv.Style.Add(HtmlTextWriterStyle.BackgroundColor, "white");
          DivRate.Controls.Add(createDiv);
          Label LeaderName = new Label();
          LeaderName.Text = TLeaders[i];
          LeaderName.Style.Add("margin-left", "600px");
          LeaderName.Style.Add("color","gray");
          LeaderName.Style.Add("font-size","20px;");
          LeaderName.Style.Add("margin-top", "10px");
          LeaderName.Style.Add("position", "absolute");
          createDiv.Controls.Add(LeaderName);
          RadioButtonList Rate = new RadioButtonList();
          ListItem bad      = new  ListItem();
          ListItem fair = new ListItem();
          ListItem  good= new  ListItem();
          ListItem veryGood = new ListItem();
          ListItem excellent = new  ListItem();
          bad.Value = "1";
          bad.Text = "Bad";
          fair.Value = "2";
          fair.Text = "Fair";
          good.Value = "3";
          good.Text = "Good";
          veryGood.Value = "4";
          veryGood.Text = "Very Good";
          excellent.Value = "5";
          excellent.Text = "Excellent";
          Rate.AutoPostBack = true;
  
          Rate.Items.Add(bad);
          Rate.Items.Add(fair);
          Rate.Items.Add(good);
          Rate.Items.Add(veryGood);
          Rate.Items.Add(excellent);
  
  
          Rate.Attributes.Add("onchange", "return LeaderName('"+TLeaders[i]+"');");
  
          Rate.SelectedIndexChanged += new EventHandler(CheckChange("s"));
  
          Rate.RepeatColumns=5;
          Rate.Width = 10;
          Rate.Height = 10;
          Rate.CssClass = "RateClass";
          createDiv.Controls.Add(Rate);
  
      }
  }
  </code></pre>
  
  <p>so in this code I create a div and I place inside it a label and a Radio Button List however what i want to do is to create an event handler and send a data to it when i call it i call it like this:</p>
  
  <pre><code>   Rate.SelectedIndexChanged += new EventHandler(CheckChange("s"));
  </code></pre>
  
  <p>and this is the event handler:</p>
  
  <pre><code>   protected void CheckChange(string s)
  {
      ScriptManager.RegisterStartupScript(Page, typeof(Page), "", "fun('" + s + "')", true);
  
  }
  </code></pre>
  
  <p>It give me an error "method name expected" when I send the data like this 
  any solution?</p>