Spotfire Redirecting to home after link click
<p>Ask: Have a button that when clicked downloads a file from a folder on the server and remains on the current page.</p>

<p>Current state and problem: I have a CustomWizardPromptControlPage that writes a simple button to the HTMLTextWriter. The onclick event for the button fires off a window.open(urlToDocument, '_blank'). By doing the button with the onclick it does actually allow me to download the file, however the parent page redirects to the home page. </p>

<p>Already tried: href - didn't download the file and redirected me to the home page. form submit - didn't do anything.</p>

<p>If anyone can give me some insight as to why Spotfire does this and what I can do to stop it from happening it would be greatly appreciated</p>

<p>--Follow up with working code sample for comments request</p>

<pre><code>namespace ACompanyName.SpotFire.ExportWithFilters
{
    public class ExportWithFiltersWebPromptControl : CustomWizardPromptControl
    {
        public ExportWithFiltersWebPromptControl(ExportWithFiltersFileSettings settings)
        {
            this.AddPage(new ExportWithFiltersPage(settings));
        }

        private class ExportWithFiltersPage : CustomWizardPromptControlPage
        {
            private readonly ExportWithFiltersFileSettings _settings;

            public ExportWithFiltersPage(ExportWithFiltersFileSettings settings) : base("Export with Filters")
            {
                _settings = settings;
            }

            protected override void OnGetContentsCore(HtmlTextWriter writer)
            {
                var domain = "https://dev.AURL.com";
                var filename = _settings.ExportWithFiltersFileInfo.Name;
                var fullFilePath = string.Format("{0}/{1}/{2}", domain, "Exports", filename);
                writer.WriteLine("&lt;a href='{0}' target=\"_blank\"&gt;Download Export with Filters&lt;/a&gt;", fullFilePath);
            }

            protected override void OnGetScriptsCore(StringBuilder builder)
            {
            }

            protected override void OnLeavePageCore(FormData data)
            {
            }

            protected override bool OnValidatePromptCore(FormData data)
            {
                return true;
            }
        }
    }
}
</code></pre>