0
I have a _Menuleft Partialview that contains my menu items, it is loaded in _Layout with the Html.Partial(") Helper. Inside the 'li' menu there is an Actionlink to click on the div "content" the forms I want, follow the example:
@Ajax.ActionLink("Empreendimento", "FormRegisterEmprendimento", "Empreendimento", new AjaxOptions()
{
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "conteudo"
})
The form is being loaded normally but within Partialview (forms) I need to load two . js that validate the fields:
<script src='~/Content/assets/libs/bootstrap-validator/js/bootstrapValidator.min.js' type='text/javascript'><\/script>;
<script src='~/Content/assets/js/pages/form-validation.js' type='text/javascript'><\/script>;
As tests I already added them at the end of Partialview (forms) and at another time inside the Bundles and added inside the Section script, but still did not load them . js.
This partial is only for "organization" of the code, ie it is called only in the view
_Layout
?– Randrade
@Randrade Yes is for easy maintenance.
– JcSaint
Then call your scripts in the view
_Layout
. Only call a script in a partial, when the use of it is really necessary.– Randrade