Click here to Skip to main content
15,896,397 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to display a JavaScript Confirm Box in ASP.Net from the code behind(VB.Net) how can i use that...
More over javascript are not called as there is a response.redirect immediate after the javascripting call in code behind... How can i use that....
Posted

 
Share this answer
 
Comments
koolprasad2003 12-Aug-11 3:10am    
Good Link Abhinav. have 5.
J.Karthick 12-Aug-11 5:23am    
Great suggestion...
Abhinav S 12-Aug-11 8:10am    
Thanks.
Abhinav S 12-Aug-11 8:10am    
Thank you.
VB
RegisterStartupScript("Alert", "<script language="" javascript="">Confirm('Are you sure ');</script>") 
 
Share this answer
 
Hi,

I think the best way to handle a confirmation is to make a fuction in the client code with
OnClientClick event call.

Nevertheless you could do it in code behind by adding an attribute in your existing button as example:

btnDelete.Attributes.Add("Onclick", "return confirm('Are You Sure to Delete this Claim?')")



Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Regards,

Algem
 
Share this answer
 
v2

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