Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, I try to use ClientDependency in my site (frontend) but I have problem with it. :(
My steps:
before
<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="/css/fanoe.css"> <link rel="stylesheet" type="text/css" href="/css/style.css">
after
@{ Layout = null; var home = @CurrentPage.Site(); Html.RequiresCss("~/css/bootstrap.min.css").RequiresCss("~/css/fanoe.css").RequiresCss("~/css/style.css"); }
below in the page I write:
@{ Html.RenderCssHere(); }
Unfortunately this code doesn't work.
I don't get a link to a file with css.
What am I doing wrong?
Thanks!
Hi Vitaly
Try:
@Html.RenderCssHere()
despite the use of the word Render in the helper name, it is not writing it out to the stream, just returning an IHtmlString.
regards
Marc
Hi, Marc
You are right!
Thank you very much.
Vitaly.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
The ClientDependency doesn't work
Hi, I try to use ClientDependency in my site (frontend) but I have problem with it. :(
My steps:
before
after
below in the page I write:
Unfortunately this code doesn't work.
I don't get a link to a file with css.
What am I doing wrong?
Thanks!
Hi Vitaly
Try:
despite the use of the word Render in the helper name, it is not writing it out to the stream, just returning an IHtmlString.
regards
Marc
Hi, Marc
You are right!
Thank you very much.
Vitaly.
is working on a reply...