I got an action result inside a controller and i need to display Modals from bootstrap-modal the problem is… .
ScriptManager.RegisterStartupScript isn’t working like in old asp.net
there is a solution to this? I’m new to mvc.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ok, the easiest solution for registering javascript from the controller was quite obvious, but frustrating for someone who’s new to the pattern:
Using named sections we find a place for put the javascript
You can use [Named Sections][1].
_Layout.cshtml
and this code for the view
_SomeView.cshtml
and in the controller we return