Posted on 2012-04-11
<asp:button ID="AddRecordbutton" runat="server" Text="Add Record" onclick="AddRecordButton_Click" onclientclick="return confirm('add record?');" />
However, I have a dropdownlist with 4 possible options, and when the user clicks a button I have to perform the action selected in the dropdownlist, only if one of the items in the dropdownlist is selected would I like to display a confirm message, not all of the time. I did a lot of searching and trial and error but can't seem to figure out how to accomplish this.