I want to make send a parameter and redirect to another page in another website using asp.net webforms programmatically please help.
I have this in code behind and I dont know how to inject it to page?
string postRefIdScript = @" <script language='javascript' type='text/javascript'> function postRefId (refIdValue) { var form = document.createElement('form'); form.setAttribute('method', 'POST'); form.setAttribute('action', '" +PgwSite +@"'); form.setAttribute('target', '_self'); var hiddenField = document.createElement('input'); hiddenField.setAttribute('name', 'RefId'); hiddenField.setAttribute('value', refIdValue); form.appendChild(hiddenField); document.body.appendChild(form); form.submit(); document.body.removeChild(form); } </script>";