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 HussainPosted Aug 20, 2013, 8:28 AM
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
Bala VigneshPosted Mar 9, 2015, 3:00 AM
rachayita jaiswalPosted Aug 21, 2013, 12:30 AM
Iftikar HussainPosted Aug 21, 2013, 12:03 AM
Regards,
Iftikar
rachayita jaiswalPosted Aug 21, 2013, 12:02 AM
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???
rachayita jaiswalPosted Aug 20, 2013, 8:22 AM
Iftikar HussainPosted Aug 20, 2013, 8:17 AM
I think you need to create your page by .aspx/WPF/silverlight and use WCF service.
Regards,
Iftikar