locked
Hardcode MVC absolute http path RRS feed

  • Question

  • In my MVC application I'm using application root "~". ("~/Content/cssBundle", "~/Scripts/scriptsBundle", "~/Content/img" etc.) Is it possible to replace application root with absolute path (hardcode url)? ex: ("abc.site.com/Content/cssBundle", "abc.site.com/Scripts/scriptsBundle", "abc.site.com/Content/img" etc.)
    • Moved by CoolDadTx Thursday, December 13, 2018 6:08 PM ASP.NET related
    Thursday, December 13, 2018 11:48 AM

All replies

  • ASP.NET MVC can be discussed at the ASP.NET forums.

    http://forums.asp.net/

    Thursday, December 13, 2018 11:52 AM
  • See if the following helps, otherwise use DA924x recommendation.

    https://codecultivation.com/generate-absolute-url-in-asp-net/


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Thursday, December 13, 2018 12:19 PM
  • That is not a good practice. Why do you need to do that ?

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]


    Blog | LinkedIn | Stack Overflow | Facebook
    profile for Ehsan Sajjad on Stack Exchange, a network of free, community-driven Q&A sites

    Thursday, December 13, 2018 12:52 PM