Thread: GridView Delete
View Single Post
  #2 (permalink)  
Old March 16th, 2007, 09:13 AM
gbianchi gbianchi is offline
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there..

try with this script

Code:
    <script type="text/javascript">
        function ConfirmDelete(e)
        {
            if (!window.confirm("your confirm text here"))
            {
                e.returnValue = false;
                if (e.preventDefault)
                    e.preventDefault();
                    return false;
            }
        }
    </script>
and add this to your button
Code:
OnClientClick="ConfirmDelete(event);"
and it will work like a charm...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
I programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
Reply With Quote