I get the following error message trying to display a pop-up message in my ASP.Net application.
System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
I need to know how to do this. I have included my code in this post.
MessageBox("Your request has been received and will be reviewed.\r\n" + "Confirmation will be sent to the email address provided.");
private void MessageBox(string msg)
Label lbl = new Label();