Interviews2 answers
What is significance of 'using ' in razor view?
sumank
Posted May 10, 2013, 11:27 AM EDT2 Answers
Two significance use of @using keyword in razor view
1) include name space
@using MvcContrib.UI.Grid
2) @using can also be used with bock of code to ensure all objects are dispose when they go to out of scope
@using(Html.BeginForm())
{
// your code
}
Jignesh TrivediPosted Apr 14, 2014, 12:04 AM EDT
@using(Html.BeginForm())
{
Content-Here.....
}
It ensures that an object is disposed when it goes out of scope.
sumankPosted May 10, 2013, 11:27 AM EDT
