Hi
I am trying to call asp.net web services in telerik kendo mobile listview but i am not getting any data its showing only loading on page .Please find code with attachment and with web services .Please check what is issue in that.
And if you can share sample code from asp.net services with telerik kendo for mobile that will helpful.
//----------web services ---------------------------
[WebMethod]
public string EmployeeList()
{
string abc = null;
JavaScriptSerializer serializer = new JavaScriptSerializer();
SqlCommand cmd = new SqlCommand("select top 10 Firstname from employee where branchid=@branchid", connection.getConn());
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@branchid", 9);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
for( int i=0;i<ds.Tables[0].Rows.Count ;i++)
{
if (i == 0)
{
abc = ds.Tables[0].Rows[i]["firstname"].ToString();
}
else
{
abc =abc+"," + ds.Tables[0].Rows[i]["firstname"].ToString();
}
}
string jsonString = serializer.Serialize(abc);
return jsonString;
}
I am trying to call asp.net web services in telerik kendo mobile listview but i am not getting any data its showing only loading on page .Please find code with attachment and with web services .Please check what is issue in that.
And if you can share sample code from asp.net services with telerik kendo for mobile that will helpful.
//----------web services ---------------------------
[WebMethod]
public string EmployeeList()
{
string abc = null;
JavaScriptSerializer serializer = new JavaScriptSerializer();
SqlCommand cmd = new SqlCommand("select top 10 Firstname from employee where branchid=@branchid", connection.getConn());
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@branchid", 9);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
for( int i=0;i<ds.Tables[0].Rows.Count ;i++)
{
if (i == 0)
{
abc = ds.Tables[0].Rows[i]["firstname"].ToString();
}
else
{
abc =abc+"," + ds.Tables[0].Rows[i]["firstname"].ToString();
}
}
string jsonString = serializer.Serialize(abc);
return jsonString;
}