Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1060
Export
posted

Hi

I have implemented Export to Excel into my application using the code in your sample but I am getting :

SecurityException : Dialogs must be user-initiated

on the following line :

bool

 

? showDialog = dialog.ShowDialog();

Any ideas how to get arond this?

Thanks

Kevin

 

  • 2515
    Offline posted

    Hi Kevin

    Could you try with moving dialog.ShowDialog() call to the first line of your OnClick function and set a breakpoint on some line after it, because there is a timeout in which the Dialog window should be shown.

    Thanks,
    George

  • 1060
    Verified Answer
    Offline posted

    Don't worry.  I have answered my own question.  When debugging using Visual Studios own Development Server ( which I was ) you get the exception and when using the local IIS ( which I now am) you do not.

    Thanks

    Kevin