Sorry for bad title, I really don't know how to describe this problem. Any suggestion is welcome. I have to implement one custom button in ribbon bar in all documents to move files from one doc lib to anorher doc lib,for ex if select some items in doc library and i click on my custom button one model pop up will open inside that popup i inserted one browse button ,by using this browse i can browse all the destination libraries,if i select any one destination library and click ok button then all selected items are moved to particular destination library upto here working fine, but my question after clicking ok button the pop up will be automatically closed and it is automatically redirect to particular destination library(means browse url)

1 Answer 1


I'm not sure that I fully understand the question (and I don't have enough rep to comment), but it sounds like you could add ?Source=http://URLHERE.com to the end of your URL to redirect.

If you already have another parameter set, you'll have to change it to &Source=http://URLHERE.com.

  • Response.Write("<script type='text/javascript'>window.top.location='"+txtDestination.Value+"';</script>");
    – chakri
    Commented Jul 24, 2015 at 14:21
  • Well he gave you an answer (which is better imo) that works just fine. If it's not acceptable to you, you can add your own answer and accept it too :) edit: I forgot we were adding extended ellipses to things for some reason................
    – Dinerdo
    Commented Jul 24, 2015 at 14:50

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.