HI All

Its urgent

Can any one please tell me how to bind the ASP.NET Datalist control on click of ext.button

Below is the code,

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)


[DirectMethod(ShowMask = true)]
public void BindDataList_Click(object sender, DirectEventArgs e)
System.Data.DataTable table = GetTable();
dlProjectAreProgramLinks.DataSource = table;


/// <summary>
/// This example method generates a DataTable.
/// </summary>
public System.Data.DataTable GetTable()
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("Id", typeof(string));
table.Columns.Add("ArtifactType", typeof(string));
table.Columns.Add("FileUrl", typeof(string));
table.Columns.Add("OriginalName", typeof(string));

table.Rows.Add("1", "Action Item Register 1", "www.yahoo.com", "Name 1");
table.Rows.Add("2", "Action Item Register 2", "www.ext.net", "Name 2");
table.Rows.Add("3", "Action Item Register 3", "www.yahoo.com", "Name 3");
table.Rows.Add("4", "Action Item Register 4", "www.ext.net", "Name 4");
table.Rows.Add("5", "Action Item Register 5", "www.yahoo.com", "Name 5");
table.Rows.Add("6", "Action Item Register 6", "www.ext.net", "Name 6");
table.Rows.Add("7", "Action Item Register 7", "www.ext.net", "Name 7");

table.Rows.Add("8", "Action Item Register 8", "www.yahoo.com", "Name 8");
table.Rows.Add("9", "Action Item Register 9", "www.ext.net", "Name 9");
table.Rows.Add("10", "Action Item Register 10", "www.yahoo.com", "Name 10");
table.Rows.Add("11", "Action Item Register 11", "www.ext.net", "Name 11");
table.Rows.Add("12", "Action Item Register 12", "www.yahoo.com", "Name 12");
table.Rows.Add("13", "Action Item Register 13", "www.ext.net", "Name 13");
table.Rows.Add("14", "Action Item Register 14", "www.ext.net", "Name 14");
return table;


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>History - Ext.NET Examples</title>
<style type="text/css">
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<asp:DataList ID="dlProjectAreProgramLinks" RepeatDirection="Vertical" runat="server"
GridLines="Both" BorderStyle="Solid">
<table border="0" style="border-color: InactiveBorder;" cellpadding="0" cellspacing="0">
<td style="vertical-align: top; text-align: left; padding-left: 5px; width: 300px;">
<asp:Label ID="lbArtifactType" runat="server" Text='<%#Eval("ArtifactType") +":" %> ' />
<tr style="height: 50px">
<td style="padding-left: 10px; padding-right: 05px; vertical-align: top; text-align: left;
width: 300px;">
<asp:LinkButton ID="LnkBtnOriginalName" runat="server" Text='<%#Eval("OriginalName")%>'
CommandName="Select" CommandArgument='<%#Eval("Id") + "," + Eval("OriginalName")%>' />
<asp:HyperLink ID="hypLnkUrl" runat="server" Target="_blank" Text='<%# Eval("FileURL")%>'
NavigateUrl='<%# Eval("FileURL") %>' Style="word-wrap: break-word" />
<ext:Button ID="btn" runat="server" Text="Submit">
<Click OnEvent="BindDataList_Click" />