Like for a single value i easily work, or also true false condition.
like getting a single value from database
string i = "";
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "SelectPass";
cmd.Parameters.AddWithValue("@userID", context.Request.QueryString["id"]);
conn.Open();
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
i = reader["Password"].ToString();
}
reader.Close();
conn.Close();
if (i == "")
{ context.Response.Write("False"); }
else
{
context.Response.Write(i);
}
and in client side easily showing the value in one variable.
function abc()
{
$.get('\HandlerResetPass.ashx?id=' + $('#txtUserId').val()+'&lbl='+ $('#lblPasswo').val(), callback);
function callback(data)
{
if (data == "False")
{
alert('ID doesn\'t exist try again..!')
return false;
}
else
{
$('#tblPassWord').show();
$('#tblprofile').hide();
role = data;
}
}
}
But how working with A dataset.
we can return data set from handler by useing that king of work.
Or in client side we get these two values by this method.