codebehind file in asp.net. But it is possible with a single line of code….
Let me explain to display a confirmation dialog box in a page…
If we have a button named Button1 then
in Page_Load add the following single statement
Button1.attributes.add("onclick","if (confirm(‘Are you sure to proceed?’)) return true;else return false;")
That’s it. Our job is done..
Now we can write the server side coding in Button1_Click that shud be executed if user clicks "yes"
on the prompt. It won’t do the postback if we go with "No" option