title: Type Cast sender (object) as dropdownlist and bind data to it?
body: <p>I want to use one function to bind data to multiple RadDropDownList(s) on the same page.</p>
  
  <p>ASPX : </p>
  
  <pre><code>&lt;telerik:RadDropDownList OnPreRender="bind_dd"ID="pprice_paymethod" 
  
  ClientIDMode="Static"runat="server" Width="100px" Skin="Metro" DefaultMessage="Pay 
  
  Method"AppendDataBoundItems="true"&gt;&lt;/telerik:RadDropDownList&gt;
  </code></pre>
  
  <p>C#</p>
  
  <pre><code>protected void bind_dd(object sender, EventArgs e)
  {
  
      RadDropDownList dd = sender as RadDropDownList;
  
      dd.DataSource = ds.Tables[0];
      dd.DataValueField = "Payment_Type_ID";
      dd.DataTextField = "Payment_Type";
      dd.DataBind();
  
  }
  </code></pre>
  
  <p>Soultion ?</p>