>Hi
>
>I want to display a message when there are not results from a stored procedure
>
>I thought I could use
>
>MessageBox.Show
>
You can't use a message box in an ASP.NET application. Remember, that code would be running on the server so it would end up displaying the messagebox on the server (assuming it hadn't thrown an exception). The normal way to do this is to have something like a label or a div that is normally hidden on the page. In your save, if it fails, you do something like this:
bool success = someObj.Save();
if (success)
{
this.lblErrorMsg.Visible = false;
else
this.lblErrorMsg.Text = "Sorry, no results were found.";
this.lblErrorMsg.Visible = true;
}