Click here to Skip to main content
15,911,317 members

Comments by Member 14738666 (Top 9 by date)

Member 14738666 27-Feb-20 8:02am View    
public Users GetUserLogin(string UserID, string Password)
{
Users us = new Users();
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());
con.Open();
SqlCommand cmd = new SqlCommand("spUserLogin", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@UserID", UserID);
cmd.Parameters.AddWithValue("@Password", Password);
SqlDataAdapter da = new SqlDataAdapter(cmd);
con.Close();
DataSet ds = new DataSet();
da.Fill(ds, "tb_Users");

return us;
}
note; this above code I wrote in svc class after that when I run this code I got above error
Member 14738666 27-Feb-20 8:00am View    
[OperationContract]
[WebGet(UriTemplate = "GetUserLogin/{UserID}/{Password}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
Users GetUserLogin(string UserID, string Password);
Note: the above code I wrote in interface
Member 14738666 24-Feb-20 6:30am View    
i want to whether below code is correct or not
Member 14738666 24-Feb-20 6:23am View    
I wrote code like below answer
Member 14738666 8-Feb-20 8:20am View    
Deleted
i want to change above code by using web services enhancements....can anyone help me