[WebMethod] public static UserDetails[] BindDatatable() { //Page page = HttpContext.Current.Handler as Page; //TextBox txtBegin = (TextBox)page.FindControl("txtEmail"); //string s = txtBegin.Text; DataTable dt = new DataTable(); List<userdetails> details = new List<userdetails>(); string sSql = "EXECUTE dbo.admin_user_sp_update @in_type = 2"; dt = EasyDBPoolcl.GetDataTable(sSql); foreach (DataRow dtrow in dt.Rows) { UserDetails user = new UserDetails(); user.Email = dtrow["flag"].ToString(); details.Add(user); } return details.ToArray(); } public class UserDetails { public string UserId { get; set; } public string UserName { get; set; } public string Location { get; set; } public string Email { get; set; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)