Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
External JS and CSS Files
#11
Hi, Alexandre

I'm afraid I'm confused, so I have separated only on Html first.
A. I have tested as you suggested. For reference path within the html file, I came to the following conclusion.
1. Notice "../wwwroot" in front of your existing path --> Work fine
2. Notice "../" in front of your existing path --> Work fine
3. Notice existing path directly such "assets/myjs/myjs.min.js" --> Work fine ( Please consider in this case whether this is actually correct or not. But I tested it and it works fine. )

---------------------------------------------------------

B. And for use ContentFiles.Add [I use to css reference] or PageContext.AddBodyScriptFile. [I use to js reference] within an IWForm.
I found that only these 2 cases work well.
Such :
1. ContentFiles.Add('/assets/vendor/bootstrap/css/bootstrap.min.css');
2. ContentFiles.Add('assets/vendor/bootstrap/css/bootstrap.min.css');
Note : I have attached a sample project filewith this together and wriote comment in case it works and does not work in "frm01" unit

Please consider if it is correct or not? or
How should it be?

-------------------------------------
------------------------------------
Note :
Considering the common point of both cases A and B, what works well in both cases is that direct path references (sucah : "assets/vendor/bootstrap/css/bootstrap.min.cs") are unobtrusive and seem to fit perfectly.
Is it correct?
------------------------------------

Thank you


Attached Files
.zip   TestProject-2.zip (Size: 904.42 KB / Downloads: 1)
Reply


Messages In This Thread
External JS and CSS Files - by baxing - 04-01-2023, 04:51 PM
RE: External JS and CSS Files - by baxing - 04-03-2023, 06:11 AM
RE: External JS and CSS Files - by brsoft - 04-04-2023, 07:12 AM
RE: External JS and CSS Files - by baxing - 04-04-2023, 09:29 AM
RE: External JS and CSS Files - by brsoft - 04-05-2023, 06:59 AM
RE: External JS and CSS Files - by baxing - 04-07-2023, 05:08 AM
RE: External JS and CSS Files - by baxing - 04-08-2023, 07:09 AM
RE: External JS and CSS Files - by baxing - 04-10-2023, 03:54 AM
RE: External JS and CSS Files - by baxing - 04-10-2023, 07:17 AM
RE: External JS and CSS Files - by baxing - 04-25-2023, 05:22 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)