locked
how to show popup RRS feed

  • Question

  • Hi,

    i am using Document libraries. i am drag and drop some folder into my document libraries. its firing my EventReceiver (ItemAdded).Actually i am checking one folder when i drag and drop i want to show Message box.

    MessageBox.Show("some text")

    why its not working? even its not showing and but adding my folder into my libraries.



    Thanks
    kiran
    Wednesday, December 3, 2008 9:27 AM

Answers

  • You cannot use a MessageBox when developing for the web as the server is running the process, and if it did work your server would have x number of message boxes displayed that nobody would see causing a block in the process.

    You can use client side javascript alerts to display a message box in the user's browser, but you will probably find this is not possible using an event handler.

    You state you want to display a message box when dragging, what is the purpose of this message?

    Stu
    Starznet SharePoint Blog : http://www.starznet.co.uk/sharepoint/blog
    Please mark replies as answered if you find it has helped you
    Contact : http://www.starznet.co.uk/contactstarznet.htm
    • Marked as answer by kiran1234 Wednesday, December 3, 2008 10:19 AM
    Wednesday, December 3, 2008 9:39 AM

All replies

  • You cannot use a MessageBox when developing for the web as the server is running the process, and if it did work your server would have x number of message boxes displayed that nobody would see causing a block in the process.

    You can use client side javascript alerts to display a message box in the user's browser, but you will probably find this is not possible using an event handler.

    You state you want to display a message box when dragging, what is the purpose of this message?

    Stu
    Starznet SharePoint Blog : http://www.starznet.co.uk/sharepoint/blog
    Please mark replies as answered if you find it has helped you
    Contact : http://www.starznet.co.uk/contactstarznet.htm
    • Marked as answer by kiran1234 Wednesday, December 3, 2008 10:19 AM
    Wednesday, December 3, 2008 9:39 AM
  • Hi,

    I think that you are a little bit confused here. The code you wrote works well with a client windows forms application. Sharepoint is a web application that runs on the server and renders on the client browser.

    If you want to show a message box to the user you will have to do some javascript trick. You can use the javascript "alert" function.

    Wednesday, December 3, 2008 9:43 AM
  • Yes you are currect actually i am thinking wrong way any way thanks for your response.
    kiran
    Wednesday, December 3, 2008 10:19 AM