return confirm for detailsview CommandField

J

Johann

Dear All

I am trying to create a button for the insert and the save action, so
that before the user submits the changes, he is prompted with an alert
box to confirm if he wants to submit the changes or not.

I have the following code at the moment:-

<asp:DetailsView ID="viewAddressBook" runat="server"
AutoGenerateRows="False" DataKeyNames="ID"
DataMember="DefaultView" DataSourceID="dsAddressBook" Height="50px"
Width="400px"
OnItemInserting="viewAddressBook_ItemInserting"
OnItemUpdating="viewAddressBook_ItemUpdating" SkinID="detailsSkin"
OnItemCommand="viewAddressBook_ItemCommand"
OnItemCreated="viewAddressBook_ItemCreated">
<Fields>
<asp:CommandField ShowEditButton="True" ShowInsertButton="True"
ButtonType="Image" CancelImageUrl="~/Images/CancelIcon.gif"
DeleteImageUrl="~/Images/DeleteIcon.gif"
EditImageUrl="~/Images/EditIcon.gif"
InsertImageUrl="~/Images/SaveIcon.gif"
NewImageUrl="~/Images/NewIcon.gif"
UpdateImageUrl="~/Images/UpdateIcon.gif" />


Can you please help me out

Thanks for your time and help

Johann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top