Click here to Skip to main content
15,898,769 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
I need the code to Use the Confirm Button in asp 2.0?
Posted
Updated 10-Nov-11 23:55pm
v2

Use This ConfirmButtonExtebder :)

<itemtemplate>
<asp:linkbutton id="LinkButton1" runat="server" causesvalidation="False" commandname="Delete" xmlns:asp="#unknown">
Text="Delete"></asp:linkbutton><cc1:confirmbuttonextender id="LinkButton1_ConfirmButtonExtender" xmlns:cc1="#unknown">
runat="server" ConfirmText="Are you sure you want to delete?" Enabled="True"
TargetControlID="LinkButton1">
</cc1:confirmbuttonextender>
pre lang="c#"></itemtemplate>
e>
 
Share this answer
 
 
Share this answer
 
Comments
Prince Antony G 11-Nov-11 6:02am    
Thanks for ur reply.... I saw the Link But i m not using those any additional AjaxControlToolKit... So please provide any other Solution?
Use Javascript
JavaScript
function checkConfirm()
{
if (confirm("are you sure"))
   alert("You pressed YES");
else
 {
   alert("You pressed NO");
   return false
  }
}



call above function on onclicentclick of button.
if you click on NO, code will not execute code behind
 
Share this answer
 
Comments
Prince Antony G 11-Nov-11 7:10am    
Thanks for ur Reply...
Checking the Two Values From TextBox and Compare the two TextBox Values (i have done those things) ...My Question is if the two values are Same i need to save those value into Database.. if not means i need to display a miessage ' The Two Values are Different, Do u Want To Continue ? '. if the user click 'Yes' means i need to save the value into Database. or else if the User click 'No' means no operation is needed..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900