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:

hanssens.org | asp.net mvc subdomain routing


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -