on the "Add Entry" button, simply follow these steps:
<asp:button ID="AddRecordbutton" runat="server" Text="Add Record" onclick="AddRecordButton_Click" onclientclick="return confirm('add record?');" />
In your code behind, just add the write code to the AddRecordButton_Click event handler. It will only be called if they clicked βYesβ in the popup window.
Alternatively, you can assign your code to the onclientclick code when the button was originally displayed.
For instance:
protected void Page_Load(object sender, EventArgs e) { AddRecordButton.OnClientClick = @"return confirm('Add Record?');"; }
Notme source share