ASP.NET MVC generate subdomain URL in View -
how generate subdomain url in view? ex, application on www.lol.com
, change sometime in near future. want link email on google apps located on subdomain mail.lol.com
.
how accomplish dont have hardcode absolute url?
asp.net mvc isn't going handle you.
luckily, you're not first 1 want this. since have full control on routing in .net mvc, have customize yourself.
if want simple take out www , replace mail (or append mail if there no www), can check out request.headers["host"]
value , modify necessary.
if want flexible handle routing check out post on how started:
Comments
Post a Comment