Hi,
I want to display data from database using handler in silverlight application ., i.e display data into silverlight datagrid. How I can make a call to this handler in silverlight application
My handler(.ashx) file looks like the below one
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
namespace CustomDatagrid.Web
{
/// <summary>
/// Summary description for Handler2
/// </summary>
public class Handler2 : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
GetSchoolData();
}
public DataSet GetSchoolData()
{
SqlConnection cn = new SqlConnection("data source=hits20\\sqlexpress;integrated security=sspi;initial catalog=EducareDBReArc");
SqlCommand command = new SqlCommand("select id,school_id from tblschoolimage", cn);
SqlDataAdapter da = new SqlDataAdapter(command);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
How i can return this dataset to silverlight application and try to bind to the datagrid?
Thanks,
Sudha