Question : create a yes no messagebox in asp.net

I have an asp.net form with a Save button and I need to display a message box with two Yes/No buttons when user clicks on it.

If user clicks on the Save button;
1.I am checking database to see if this user is teacher or student. If user is a teacher then set the message box content to text#1 and if student then text#2.
2.Now I need to display a message box that displays the proper text (text#1 or text#2) and have Yes/No buttons
3.If user selects Yes then I will save a record in one table and if selects No I will save a record to another table.

I need exactly look and functionality of confirm message box in JavaScript, only having Yes/No buttons which would work in both IE and Firefox.

What would be the best and simplest approach?
I appreciate any comment, thanks.

Answer : create a yes no messagebox in asp.net

You'll need to use AJAX to find a solution to this small problem.

Alternatively here's the link to a Yes/No MsgBox class. It is written in C# and quite excellent.

http://www.c-sharpcorner.com/UploadFile/mahesh/WebMsgBox09082006110929AM/WebMsgBox.aspx
Random Solutions  
 
programming4us programming4us