How to pop up a dialog box after submit a form?

Hi

I have a submit form with 6 submit buttons. I want to pop up a js dialog box after click the submit button. I use ASP.NET and VC#. How can I do that?

Thanks
techquesAsked:
Who is Participating?
 
techquesConnect With a Mentor Author Commented:
0
 
leegclystvaleCommented:
This gives examples and js code for dialogue boxes http://www.webreference.com/js/tutorial1/dialog.html
0
 
techquesAuthor Commented:
I do not understand the article.

Here is my C# code to click button.

After submitting it, it does not trigger the js.

How should I fix it?
VC#:
private void click(object sender, System.EventArgs e)
        {
            if (Page.IsValid)
            {
                try
                {
                     InsertDB();
                }
                catch
                {
                    Response.Redirect("error.html");
                }
                finally
                {
                }
                button1.Attributes.Add("OnClick", "Send()");
            }
        }
 
Javascript:
function Send()
{
	window.alert('Message Submitted');
}

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.