jazz right

jazz right

  • NA
  • 4
  • 0

Alert message in C#

Apr 15 2008 8:17 PM
i want to use the pop  box to appear when the user click the delete button asking the user 'Are you sure you want to delete'.
But the problem is when the user first hits the delete button the pop up message doesnt show up but when the delete button is clicked second time then the pop up message shows.
Can someone help me in this please. here is my code for reference:
protected void btnDelete_Click(object sender, EventArgs e)
        {
            btnDelete.Attributes.Add("onclick", "javascript:return confirm('Are you sure you want to delete')");
            lblMessage.Text = "Testing";
            lblMessage.Visible = true;
        }

Answers (1)