I've been trying to have a button on a infopath form that when clicked will open a url in a new browser window. I've tried code along the lines of the following but to no avail.
public void CTRL7_5_Clicked(object sender, ClickedEventArgs e)
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.UseShellExecute = true;
process.StartInfo.FileName = "http://www.google.co.uk";
process.Start();
}
Infopath for a second shows a progress bar with 'sending data to server' where I assume it's calling the event handler on the server but then it doesn't do anything after that. As the form is hosted in a browser and hence the code behind running on the server, does that mean it's trying to open the page on the server? If so how can I get the url opened on the client machine.
I'm not using a hyperlink control as I can't find a way to track which links have been clicked and which haven't on the form.