want to ask about void type, so I could know that it works or no

in PHP i could have a condition like this:

```
if(mysql_query($query))
{ bla bla }
else
{ print error }

```

how to do like that on ASP.NET?

i'm trying like this:

```
if (k.EditPassword(username.Text, oldPassTxt.Text, newPassTxt.Text) == true )
{
Response.Redirect("sample.aspx");
}
else
{ print error }

```

but of course, it cannot be like that, because void isn't boolean