Open web URL submit button in ASP

Hello,

When the user click on the submit button, is it possible to display a web URL ?

Thank you,

Best regards,
Noémie

@noemief Can you elaborate what you mean display a web URL?
Do you need to show a popup with a URL? What URL you want to display?

Thank you for your answer. I want to open another browser window of a website.

Noémie

Do you still want to submit (meaning the webform submits but at the same time a new browser window opens) or you want to replace the submission by opening a new browser with some other URL?

Yes, I still want to submit at the same time

In code behind of your form designer webform, you can add this line under Page_Load

protected void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        
        submitButton.Attributes.Add("OnClick","javascript:window.open('http://www.XXXXX.com','blank')");
        
    }

You can add condition to only activate this URL trigger base on condition or workflow action name

1 Like

It works. Thanks for your help !

Best regards,
Noémie