- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
Are instance variables set within a controller method accessible within a view?

1. Yes, any instance variables that are set in an action method on a controller can be accessed and displayed in a view.

2.Yes, instance variables set within an action method are accessible within a view, but only when render is explicitly called inside the action method.

3. No, instance variables in a controller are private and are not accessible.

4.No, instance variables can never be set in a controller action method.

Posted Date:-2022-09-17 03:36:28


More MCQS Questions and answers

Search