Hello,
You have to write the below code in onClick event of your button,
1. For getting the text box value,
string textValue = XDocument.DOM.selectSingleNode("XPath of your field").text;
2. Prepare the url using above value.
3. Using below code we can open the form,
Application.XDocuments.New(<Url of the form>, 1);
Note: In this we can't redirect to the above url. But we can close the exist form and open the new form.