using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Script.Services; using System.Web.Script.Serialization; using MySql.Data.MySqlClient; using System.Data; [WebMethod] public loginfields[] login_form_validation2(string username, string password) { con = c.get_connectionstring(); loginfields l = new loginfields(); con.Open(); var samples = new List<loginfields>(); cmd = new MySqlCommand("select *from login where username='" + username + "' and password='" + password + "'", con); MySqlDataReader dr = cmd.ExecuteReader(); // IDictionary<string,string> dict = new Dictionary<string,string>(); l.ids = "1"; l.username = "eswar"; l.status = "1"; samples.Add(l); // dr.Read(); //loginfield[0].ids = dr.GetString["id"]; return samples.ToArray(); } public loginvalidation() { // // TODO: Add constructor logic here // } } public class loginfields { public string ids { get; set; } public string username { get; set; } public string status { get; set; } }
-<arrayofloginfields xmlns="http://tempuri.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> -<loginfields> <ids>1</ids> <username>eswar</username> <status>1</status> </loginfields> </arrayofloginfields>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)