add dynamic script using mvc partial view load code example
Example: dynamically load partial view mvc
// partial view controller
public IViewResult LoadPartial() {
return PartialView("_login"); // name of the partial view
}
// view (with jquery)
$("#container").load("LoadPartial");