or
for (int a = 0; a < allAudit.GetLength(0); a++){ // ....... int auditID = int.Parse(allAudit[a, 0]); double percent = ((double)countTotalAuditable/(double)countTotal) * 100.0; TableRow row = new TableRow() { BackColor = Color.FromArgb(215, 230, 247) }; TableCell cell_processName = new TableCell() { HorizontalAlign = HorizontalAlign.Left,VerticalAlign = VerticalAlign.Middle }; TableCell cell_date = new TableCell() { HorizontalAlign = HorizontalAlign.Center, VerticalAlign = VerticalAlign.Middle }; TableCell cell_progression = new TableCell() { HorizontalAlign = HorizontalAlign.Center, VerticalAlign = VerticalAlign.Middle }; TableCell cell_responsable = new TableCell() { HorizontalAlign = HorizontalAlign.Center,VerticalAlign = VerticalAlign.Middle }; Label lblProcessName = new Label() { Text = allAudit[a, 1] }; Label lblDate = new Label() { Text = DateTime.Parse(allAudit[a, 3]).ToLongDateString() }; Label lblProgressionAudit = new Label() { Text = percent+" %" }; RadDropDownList droopDownResponsable = new RadDropDownList(); droopDownResponsable.EnableEmbeddedScripts = false; droopDownResponsable.ID = "droopDownResponsable"; droopDownResponsable.ClientIDMode = System.Web.UI.ClientIDMode.Static; droopDownResponsable.OnClientSelectedIndexChanged = "cbx_responsible_SelectedIndexChanged("+auditID+");"; SqlDataSource sourceUserList = new SqlDataSource(ConfigurationManager.ConnectionStrings["SCI2ConnectionString"].ToString(), "SELECT [tblUser].[userID], [UserName] FROM [aspnet_Users] INNER JOIN [tblUser] ON [aspnet_Users].[UserId] = [tblUser].[membershipID]"); droopDownResponsable.DataValueField = "UserID"; droopDownResponsable.DataTextField = "UserName"; droopDownResponsable.DataSource = sourceUserList; droopDownResponsable.DataBind(); foreach (DropDownListItem item in droopDownResponsable.Items) { if (item.Text == allAudit[a, 2]) { item.Selected = true; } } cell_processName.Controls.Add(lblProcessName); cell_date.Controls.Add(lblDate); cell_progression.Controls.Add(lblProgressionAudit); cell_responsable.Controls.Add(droopDownResponsable); row.Cells.Add(cell_processName); row.Cells.Add(new TableCell() { Text = " ", Width = 20 }); row.Cells.Add(cell_date); row.Cells.Add(new TableCell() { Text = " ", Width = 20 }); row.Cells.Add(cell_progression); row.Cells.Add(new TableCell() { Text = " ", Width = 20 }); row.Cells.Add(cell_responsable); tableAuditAdministration.Rows.Add(row); // .......}

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <asp:ScriptManager runat="server" ID="ScriptManager"></asp:ScriptManager> <telerik:RadAjaxManager runat="server" ID="RadAjaxManager"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnTest"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="pnlAll" LoadingPanelID="LoadingPanel" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel" BackColor="Black" Transparency="50"></telerik:RadAjaxLoadingPanel> <asp:Panel runat="server" ID="pnlAll"> This is the test page. <br /><br /><br /><br /> <asp:Button runat="server" ID="btnTest" Text="Test Me" /> </asp:Panel> <telerik:RadFormDecorator Enabled="true" runat="server" ID="RadFormDecorator1" Skin="Default" DecoratedControls="Buttons" /> </form></body></html>using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace WebApplication2{ public partial class WebForm1 : System.Web.UI.Page { public WebForm1() { this.Init += WebForm1_Init; } void WebForm1_Init(object sender, EventArgs e) { btnTest.Click += btnTest_Click; } void btnTest_Click(object sender, EventArgs e) { throw new Exception("THis is a test") ; } }}

