i have create service as -
[OperationContract]
DataSet SelectUserDetails(string userid1, string password1);
public DataSet SelectUserDetails(string userid1, string password1)
{
using (SqlConnection con = new SqlConnection(strConnection))
{
con.Open();
SqlCommand cmd = new SqlCommand("SELECT UserId,Password FROM M_Users", con);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
cmd.ExecuteNonQuery();
con.Close();
return ds;
}
}
how to call this and userid and password credentials on button click event???
protected void btnsubmit_Click(object sender, EventArgs e)
{
}
how to call this and userid and password credentials on button click event???
protected void btnsubmit_Click(object sender, EventArgs e)
{
}

Iftikar HussainRank #423 · 5.9K reputationPosted Aug 20, 2013, 4:28 AM EDT
bool result=false;
where UserId=@UserId and Password=@Password", con);
cmd.Parameters.AddWithValue("@UserId",userId);
cmd.Parameters.AddWithValue("@Password",password);
if(reader.HasRows)
{
result=true;
}
return result;
Regards,
Iftikar
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 20, 2013, 4:17 AM EDT
I think you need to create your page by .aspx/WPF/silverlight and use WCF service.
Regards,
Iftikar
rachayita jaiswal182 reputationPosted Aug 20, 2013, 4:22 AM EDT
rachayita jaiswal182 reputationPosted Aug 20, 2013, 8:02 PM EDT
On btn_Click event i have mention code like -
so it is working fine...
Now inplace of select query i want to use stored procedure..so i can create class and call stored procedure???
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 20, 2013, 8:03 PM EDT
Regards,
Iftikar
rachayita jaiswal182 reputationPosted Aug 20, 2013, 8:30 PM EDT
Bala Vignesh12 reputationPosted Mar 8, 2015, 11:00 PM EDT