ASP.NET Web Optimization Framework

发布时间 2023-11-03 13:59:23作者: ChuckLu

ASP.NET Web Optimization Framework

We can use patterns while searching files or subdirectories by using “*” wildcard character as follows:

Include(“~/Scripts/Common/*.js”) ===> this will include all js files.

IncludeDirectory(“~/Scripts/Common”,”T*.js”) ===> this will include all js files whose name starts from T.

Now, the next question is we have created bundles, now how will we include in view or aspx file?

We will use Styles.Render for CSS and Scripts.Render for script file as follows:

 

Click on Script tab and select Test.aspx dropdown list. You can see js?v…….. like some random string that is the bundle name.