jquery - Scripts no longer work after moving to _layout (ASP.NET MVC) -
all scripts worked fine when had view. , when tried split layout , partial view - scripts no longer worked. please answer questions: 1) links should placed? in view or in _layout? if in layout, should use @scripts.render or
2) scripts should placed? in view or in _layout? or can this: place scripts in view in @section scripts{ } , in layout use
actually can add scripts in master _layout page html created , views should use _layout.
your _layout page should as:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> @rendersection("scripts", required: false) </head> <body> @renderbody() </body> </html>
Comments
Post a Comment