Hello
I am writing the following code
public bool validation(string uname, string pword)
{
uname = username;
pword = password;
dbinsert db = new dbinsert();
SqlDataReader dr = db.Datareader("select Password from registration where UserName='" + uname.ToString() + "'");
if (dr.Read())
{
if (pword == dr["Password"].ToString())
{
return (true);
}
else
{
return (false);
}
}
The above error is showing the following error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0161: 'LoginCtrl.validation(string, string)': not all code paths return a value
Source Error:
Line 51: }
Line 52:
Line 53: public bool validation(string uname, string pword)
Line 54: {
Line 55: uname = username;
Source File: d:\AJAXEnabledWebSite1\LoginCtrl.ascx.cs Line: 53
Pleaes solve the problem as soon as possible