Click here to Skip to main content
15,892,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'd like to find where they're stored files (or paths) like javascripts, css, images. By write I mean for example
<link href="@Url.Content("~/css/table.css")" rel="stylesheet" type="text/css" />
If there is a collection in the root cshtml object (this) where another style is added, or how it works?

What I have tried:

I tried to search this object, but it is quite large and maybe these collections are not even there.
Posted
Updated 20-Sep-21 22:06pm

1 solution

Simple: the file is called table.css, and it's in the css folder in the root of your site.

Since you haven't explained what you mean by "collections" and "this object", we can't tell you anything else.
 
Share this answer
 
Comments
KarNullKa 21-Sep-21 4:26am    
I wrote "this" object in cshtml, I mean if you set break point in cshtml file, when debugging set variable "this" (Watch window) which is an object AspNetCore._Views_Shared_Components_ViewName type. By collection I meant List, Array, or something where you can get a list of files at runtime and then list them in a view, for example. Files can be added from different places, from different directories, projects..., I would like a list of all the files the view has access to.
Richard Deeming 21-Sep-21 4:31am    
Still not clear. The view has "access" to any file in your site. That will include all of the files physically included in your project, and any files in any virtual directories configured within IIS.

And technically, it can include CSS/Javascript/image files from external sites as well, so the list is basically "every file on the entire internet".
KarNullKa 21-Sep-21 4:36am    
If I add a new css file or something else, where does this information go? I mean into some object that has a list inside.
Richard Deeming 21-Sep-21 4:37am    
If you add a new file, it "goes" wherever you add that file. If you add it in the css folder, then that's where it is.
KarNullKa 21-Sep-21 4:44am    
But this is not adding a file, this is just referencing it for the view. There may be many files in the directory, but only some are referenced in the view. How does the view find out which file has been referenced and which has not? It probably has to have it written down somewhere, which is what I'm looking for.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900