I’m trying to use a button click to open a page in a new tab/window. I’ve looked at solutions similar to this, but the answers given there are either to use a link or have it open in the same window. I need to use a button because it needs to generate the link based on criteria data entered in the form (string manipulation). This button is not submitting the form though; it’s just validating some of the data on an external site. I need this in a different window or tab so they can go back and forth between my form and the validation site. This is basically my current Button_Click
event:
var Address = AddressTextbox.Text.Trim();
Address = Address.Replace(' ', '+');
var Url = "http://www.example.com/query?text=" + Address + "¶m1=foo¶m2=bar";
Response.Redirect(Url);
This works except that Response.Redirect(Url)
only opens in the same window, not a new one.