I need a confirmation box for Item Adding event on a custom document library, can someone tell me what would be the best way of doing it using C# or I don't mind using jQuery/Javascript plugin either.

2 Answers 2


You make a redirect to the application page and show a confirmation box.


This will cause the redirect, which you point to an application page with your confirmation button on it.

You can do this with the client object model with ECMA script also.

Just write the javascript to take over the functionality and handle the request. In my opinion this is nicer for users, as it visibly takes less time.

The simple way: Only had to do this for item deleting, and I use a java script confirmation box bound to the button, using JQuery.

  • thanks +1 but what instead of redirecting to application page, If display a Div using scripting, but I am not able to find any relevant tutorial for this tho :( Nov 5, 2012 at 11:06
  • Ah, well you bind to the link your javascript with JQuery, return false in the onclick event will prevent it from going to the url. You then code in your javascript whatever you want to handle the event.
    – Hugh Wood
    Nov 5, 2012 at 11:38
  • to be honest, I am lost, is there any tutorial you can find me please Nov 5, 2012 at 11:42

My research said its not possible, only thing you can do is, redirect to a different page aspx page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.