Skip to main content
improved formatting
Source Link
Baby Groot
  • 4.3k
  • 39
  • 55
  • 70

Try the following code,

string user_stat = Convert.ToString(cmd.ExecuteScalar())
 
    if(Convert.ToBoolean(user_stat ))
    {
    -----
    -----
    }

In side if condition, You will get either true/false

Try the following code,

string user_stat = Convert.ToString(cmd.ExecuteScalar())
 
    if(Convert.ToBoolean(user_stat ))
    {
    -----
    -----
    }

In side if condition, You will get either true/false

Try the following code,

string user_stat = Convert.ToString(cmd.ExecuteScalar())
if(Convert.ToBoolean(user_stat ))
{
-----
-----
}

In side if condition, You will get either true/false

Try the following code,

string user_stat = Convert.ToString(cmd.ExecuteScalar())

if(Convert.ToBoolean(user_stat )) {

}

string user_stat = Convert.ToString(cmd.ExecuteScalar())

    if(Convert.ToBoolean(user_stat ))
    {
    -----
    -----
    }

In side if condition, You will get either true/false

Try the following code,

string user_stat = Convert.ToString(cmd.ExecuteScalar())

if(Convert.ToBoolean(user_stat )) {

}

In side if condition, You will get either true/false

Try the following code,

string user_stat = Convert.ToString(cmd.ExecuteScalar())

    if(Convert.ToBoolean(user_stat ))
    {
    -----
    -----
    }

In side if condition, You will get either true/false

Source Link

Try the following code,

string user_stat = Convert.ToString(cmd.ExecuteScalar())

if(Convert.ToBoolean(user_stat )) {

}

In side if condition, You will get either true/false