There are a couple of options, if you are using AJAX then you can use the ModalDialogExtender to create a kind of 'popup' - say an ASP.NET control that appears over the top of the page and prompts for confirmation.
If not, the best way to interact with the user is still JavaScript, but from the sounds of it you want to cause the popup to occur from your C# code, based on some more logic for example. One option would be to set the 'onclick' attribute of a button, the value of which is interpreted as JavaScript and executed when the button is clicked (and it can abort the button click event if the JavaScript returns a value of 0).
This may come in useful, though it is in the VB.NET language:
http://authors.aspalliance.com/aldotnet/examples/cd.aspx
And here's a good article on the topic from Microsoft, in C#:
http://www.asp.net/data-access/tutorials/adding-client-side-confirmation-when-deleting-cs
They apply to deletion, which is the more common reason to add a confirmation box, but the same technique can be used for 'edit' operations.