Redirect URL

Hi people,
I’m trying to create the sample (http://documentation.bonitasoft.com/redirect-url-tutorial) in .NET instead of PHP and I’m not getting.
Could anyone help?
The code in .NET is: