I am returning a value from SQL. Let's give it a name as ReturnedFromSQL
. In my application, I am giving an input. Let's give it a name as Input
. I want to compare these two and do an activity. Currently, I am doing this with an IF
condition.
Let's say, from SQL I am getting FAB01
and as the Input I am getting Fab01
. What I want to do is to jump to ELSE
part after comparing these two if these two are not same and execute IF
part if these two are same.
It is obvious that just the letters have changed but the idea is same. Since these two are same, I need to execute what is in IF
part instead of jumping to ELSE
. But it is not happening now. How do I do that? Can anyone help me? Thank you in advance.
IF (ReturnedFromSQL == Input )
{
return RedirectToAction("Exist");
}
else
{
//Doing Something
}