I used some jquery in my partial view and realised that I need to have the script reference put in the partial view Again in order for the jquery to works.
I wonder is there any method which I can “call” all the script references in the Layout page so I dont need to duplicate it in the Partial View??
I tried to search for related information and tried to use @section to store the script references, but it seems cant work.
Hope can get some guide here… Appreciate it…
You can put all your script references in a Partial View of its own, and then call
@Html.Partial("ScriptReferences")from both the Layout page and the other Partial View that needs the script references.