How to get URL port?

  
Hi, guys! I wanna know with there´s a way to get the URL port for redirect purpose. Today i´m using GetURL´s function, but it strips out the port :/. I need to use port 82 from outside my company to access my website.

Thx!!!
Hi Rogério,

You can create an extension and use 
HttpContext.Current.Request.Url.Port

Cheers
Hi Rogério,

Why do you need a full url for your redirect?
If you keep your redirects url's relative paths (just starting with "/" instead of "http://.../") you don't need to worry about the server name and ports, they will just keep the same as the current url in the browser.

What kind of redirects are you trying to do?

Regards,
João Rosado
Hi, João Rosado! I´ll try a relative path! Thank you!