Thank you very much , it worked! :)
can you tell me If it is posible to change the 'ok' and 'cancel' to 'yes' and 'no' ???
can you tell me If it is posible to change the 'ok' and 'cancel' to 'yes' and 'no' ???
<asp:ImageButton ID="btnDelete" runat="server" OnClick="btnDelete_Click" ImageUrl="~/Images/icon/deletebuttonoff.png"
CausesValidation="False" OnClientClick="return confirm('are u sure ?')" />
<div> that would display your message and have 2 buttons "yes" and "no".<div> that contains the message and the "yes" and "no" button.<div>.<div id="confirmSubmit" style="display:none; position:absolute; z-index:1; height:200px; width:200px;">
<div id="messageSection">
<p>Are you sure?</p>
</div>
<div id="buttonSection">
<asp:Button ID="userConfirmed" OnClick="btnDelete_Click" runat="server" Text="Yes" onclick="document.getElementByID('confirmSubmit').style.display='none'" />
<input type="button" onclick="document.getElementByID('confirmSubmit').style.display='none'">No</input>
</div>
</div>
<div>:<asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/Images/icon/deletebuttonoff.png"
CausesValidation="False" OnClientClick="document.getElementByID('confirmSubmit').style.display='block'; return false;" />
btnDelete_Click method works for the Yes button.<div> and want to stick to ASP.NET controls, you can use Panels like this:<asp:Panel ID="confirmSubmit" runat="server" style="display:none; position:absolute; z-index:1; height:200px; width:200px;">
<asp:Panel ID="messageSection" runat="server">
<p>Are you sure?</p>
</asp:Panel>
<asp:Panel ID="buttonSection" runat="server">
<asp:Button ID="userConfirmed" OnClick="btnDelete_Click" runat="server" Text="Yes" onclick="document.getElementByID('confirmSubmit').style.display='none'" />
<asp:Button ID="userCanceled" runat="server" onClientClick="document.getElementByID('confirmSubmit').style.display='none'; return false;" Text="No" />
</asp:Panel>
</asp:Panel>
Comment