Click here to Skip to main content
15,892,005 members

Comments by Abhimanyu vij (Top 12 by date)

Abhimanyu vij 5-Oct-13 4:54am View    
But tell me how i can set i am new to XML
Abhimanyu vij 26-Jul-13 1:01am View    
[WebMethod]
public List<properties> GetStates()
{
SqlConnection oSqlConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);
SqlCommand oSqlCommand = new SqlCommand("select * from States", oSqlConnection);
oSqlCommand.CommandType = CommandType.Text;
oSqlConnection.Open();
List<properties> oListproperties = new List<properties>();
using (SqlDataReader OReader = oSqlCommand.ExecuteReader())
{
while (OReader.Read())
{
properties Oproperties = new properties();
Oproperties.Id = Convert.ToInt32(OReader["State_ID"].ToString());
Oproperties.State = OReader["State"].ToString();
oListproperties.Add(Oproperties);
}

}
return oListproperties;

}
[WebMethod]
public List<properties> GetCity(int ID)
{

//properties Oproperties1 = new properties();
//Oproperties1.Id = StateID;

SqlConnection oSqlConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);
SqlCommand oSqlCommand = new SqlCommand("select * from City where State_ID ="+ID , oSqlConnection);
oSqlCommand.CommandType = CommandType.Text;
oSqlConnection.Open();
List<properties> oListproperties=new List<properties>();
using(SqlDataReader OReader = oSqlCommand.ExecuteReader())
{while(OReader.Read())

{properties Oproperties=new properties();
Oproperties.Id=Convert.ToInt32(OReader["ID"].ToString());
Oproperties.City=OReader["City"].ToString();
oListproperties.Add(Oproperties);
}
return oListproperties;
}

}
Abhimanyu vij 26-Jul-13 1:01am View    
[WebMethod]
public List<properties> GetStates()
{
SqlConnection oSqlConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);
SqlCommand oSqlCommand = new SqlCommand("select * from States", oSqlConnection);
oSqlCommand.CommandType = CommandType.Text;
oSqlConnection.Open();
List<properties> oListproperties = new List<properties>();
using (SqlDataReader OReader = oSqlCommand.ExecuteReader())
{
while (OReader.Read())
{
properties Oproperties = new properties();
Oproperties.Id = Convert.ToInt32(OReader["State_ID"].ToString());
Oproperties.State = OReader["State"].ToString();
oListproperties.Add(Oproperties);
}

}
return oListproperties;

}
[WebMethod]
public List<properties> GetCity(int ID)
{

//properties Oproperties1 = new properties();
//Oproperties1.Id = StateID;

SqlConnection oSqlConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString);
SqlCommand oSqlCommand = new SqlCommand("select * from City where State_ID ="+ID , oSqlConnection);
oSqlCommand.CommandType = CommandType.Text;
oSqlConnection.Open();
List<properties> oListproperties=new List<properties>();
using(SqlDataReader OReader = oSqlCommand.ExecuteReader())
{while(OReader.Read())

{properties Oproperties=new properties();
Oproperties.Id=Convert.ToInt32(OReader["ID"].ToString());
Oproperties.City=OReader["City"].ToString();
oListproperties.Add(Oproperties);
}
return oListproperties;
}

}
Abhimanyu vij 16-Jul-13 2:45am View    
through json function CheckLogin() {
var email1 = document.getElementById("txtLoginusername").value;
var pass = document.getElementById("txtLoginpassword").value;



// alert(email1 + " , " + pass);
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "../WebServices/CheckLoginService.asmx/LoginCh",
data: "{'email':'" + email1 + "','password':'" + pass + "'}",
dataType: "json",
success: function (response) {
var Result = response.d
if (Result == true) {
var url = 'http://localhost:51001/UI/RegisterUser.aspx';
$(location).attr('href', url);


}
// alert(Result);
},
error: function (result) {

var Result = result.d;
if (Result == false) {


alert(Result);
}

}
})

return false;
plz tell Me solution
Abhimanyu vij 16-Jul-13 0:43am View    
Reason for my vote of 5 \n good article