Become a GOLD member of Deccansoft and get access to 40+ courses!!
NewBatches/Webinars
Packages
Gold Membership
Bestseller
Microsoft Azure Suite & Suite Plus
Power Platform Acadamy
New
Azure DevOps Expert & Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Courses
MS.NET Courses (Includes Live Project)
Complete C#, OOPs and Windows Programing
ASP.NET MVC Online Training
ASP.NET WebForms
ASP.NET Core
WCF incl. Web Services and Remoting
WPF incl. MVVM and Prism
LINQ and Entity Framework
Live Project Training for Developing Enterprise Application
Live Project using Ntier Arch (.NET5 + EF Core + Angular)
Microservices using .NET Core
Gold Membership
CareerStep IT Program
Client-side UI Technologies
Building Static Web Pages using HTML and CSS
JavaScript and HTML DOM
jQuery, AJAX and JSON
Building Interactive Web Pages using HTML5 and CSS3
BootStrap + Live Examples
AngularJS + Live Project
Angular + Typescript
ReactJS
KnockoutJS
Xamarin
SQL Server + MSBI
SQL Server 2017
Querying Data with Transact-SQL(70-761)
SQL Server Integration Service (SSIS)
SQL Server Reporting Service (SSRS)
SQL Service Analysis Service (SSAS)
Cloud Computing / Azure / AWS
AZ-900: Microsoft Azure Fundamentals
Azure Suite (AZ-104+AZ-204+AZ-305+ AZ-500)
AZ-104: Microsoft Azure Administrator
AZ-204: Developing Solutions for Microsoft Azure
AZ-305: Microsoft Azure Architect Technologies and Design
DP-203: Data Engineering on Microsoft Azure
Amazon Web Services (AWS)
DevOps Expert
AZ-400: Microsoft Azure DevOps
Docker by Sandeep Soni
Kubernetes by Sandeep Soni
Docker & Kubernetes by Rahul Rampurkar
IaC Using Terraform
Powershell
Microsoft Power Platform
Microsoft Power Platform
Data Analytics using PowerBI (DA-100)
Testing Tools
Manual Testing
Selenium Testing with Java(Live Training)
Others
Python Programming
C and Data Structure
Core Java
OOPs and C++
Advance Java
Complete Azure Training
Pricing
Videos
Testimonials
Azure Certification
Contact Us
Login
Login or Register
×
Sign In
Register
Forgot Password?
How did you find us
WhatsApp
YouTube
LinkedIn
Facebook
Telegram
Twitter
Google
Referred by Friend
Refresh
Input symbols
By clicking Register, you accept to the
terms and conditions
and that you have read our
privacy policy.
Recover Password
×
Submit
Enquiry Now
Where did you come to know about us
WhatsApp
YouTube
LinkedIn
Facebook
LinkedIn Ad
Email
Twitter
Google
Referred
Other
Refresh
Input symbols
Exploring Razor Views
Interview Questions and Answer
1. What are the valid extensions of Razor view file
Options:
a. .cshtml
b. .vbhtml
c. .aspx
d. .html
Reveal Answer
2. When an ASP.NET MVC application is build, Razor views files are also compiled to generate DLL
Options:
a. Yes
b. No
Reveal Answer
3. Which One is the advantages of Razor view
Options:
a. Razor view is used to eanble a fast coding workflow
b. It's not a new Language
c. Razor views having great intellisense
d. For writing View code, not Require any specific text editor
Reveal Answer
4. Layout views are used as the Master pages in ASP.NET MVC. Is it Correct?
Options:
a. Yes
b. No
Reveal Answer
5. Layout.cshtml file Present in Which Location
Options:
a. Views\_Layout.cshtml
b. Views\Shared\__Layout.cshtml
c. \_Layout.cshtml
d. its present in Root directory
Reveal Answer
6. What is the Output of the following code @{ var name= "John"; Hello, my name is @name }
Options:
a. Compilation Error
b. Hello, my name is @John
c. Hello, my name is @name
Reveal Answer
7. What is the Output of the following code @{ var i=1; @:this is @(i)st line; }
Options:
a. this is 1st line;
b. compilation error
c. this is ist line;
d. this is 1st line
Reveal Answer
8. What is the Output of the following code @{ int var=10; } @var/2
Options:
a. 10/2
b. 5
c. no output
d. Compilation error
Reveal Answer
9. What is the Output of the following code @{ var domain="Microsoft"; @:Jhon@domain.com }
Options:
a. Jhon@domain.com
b. JhonMicrosoft.com
c. Jhon@Microsoft.com
d. Jhondomain.com
Reveal Answer
10. What is the Output of the following code @ { var domain="Microsoft"; @:Jhon@(domain).com }
Options:
a. JhonMicrosoft.com
b. Jhon@Microsoft.com
c. Jhondomain.com
d. Jhon@domain.com
Reveal Answer
11. What is the Output of the following code @{ var domain="Microsoft"; @:Jhon@@@(domain).com }
Options:
a. Jhon@@Microsoft.com
b. Jhon@Microsoft.com
c. Jhon@domain.com
d. Compilation Error
Reveal Answer
12. what is the output rendered by following code @{ string str="<b>demo</b>"; } @Html.Raw(str)
Options:
a. "<b>demo</b>"
b. <b>demo</b>
c. "demo"
d. demo
Reveal Answer
13. what is the output rendered by the following code @{ string str="<b>demo</b>"; } @str
Options:
a. <b>demo</b>
b. >b<demo>/b<
c. <>demo<>
d. <:b>:demo<:/b>:
Reveal Answer
14. What is the output rendered by the following code <img src="/Images/@Model.Employee.jpg"/>
Options:
a. <img src="/Images/x"/> where x is the value of jpg property of an object refereed by Model.Employee.
b. <img src="/Images/x.jpg"/> where x is value.model.Employee
c. <img src="/Images/x.Employee.jpg"/> where x is value of model
d. compilation error
Reveal Answer
15. What is the output of the following code. @{ var result = "Abc"; @if(result!="") <p>Result:@result</p> }
Options:
a. <p>Result:Abc</p>
b. <p>Result</p>
c. compilation error
d. Result:Abc
Reveal Answer
16. Which of the following statements are supported by Razor view.
Options:
a. With
b. For
c. Foreach
d. while
e. All of the above
Reveal Answer
17. Which of the following are valid comments in Razor view.
Options:
a. @* A comment *@
b. // A comment
c. @{ //A comment }
d. /* A comment */
Reveal Answer
18. Which of the following is compulsory in master layout page(.cshtml)
Options:
a. @RenderBody
b. @RenderSection
c. @script.Render
d. @styles.Render
Reveal Answer
19. Which of the following is valid sequence of executing?
Options:
a. _viewStart.cshtml,view in context,_Layout.cshtml
b. view in context,_viewStart.cshtml,_Layout.cshtml
c. _Layout.cshtml,_viewStart.cshtml,view in context
Reveal Answer
20. In Asp.net web application they can have more than one layout pages?
Options:
a. Yes
b. No
Reveal Answer
21. If required, a View can overwrite Layout property referring to a cs.html file present in the current controllers folder under views folder?
Options:
a. Yes
b. No
Reveal Answer
22. Which of the following used to check if the section is present in view or not?
Options:
a. IsSectionAvailable("SectionName")
b. IsSectionNotAvaliable("SectionName")
c. IsSectionNotDefined("SectionName")
d. IsSectionDefined("SectionName")
Reveal Answer
23. A partial View can have layout page if required
Options:
a. Yes
b. No
Reveal Answer
24. Which of the following used in Razor inside code block to include the content of output renderd by the partial view name by Demo
Options:
a. @Html.Partial("Demo")
b. @Html.RenderPartial("Demo")
c. Html.Partial("Demo")
d. Html.RenderPartial("Demo")
Reveal Answer
25. which of the following used in Razor outside code block to include the content of output renderd by the partial view by name Demo
Options:
a. @Html.Partial("Demo")
b. @Html.RenderPartial("Demo")
c. Html.Partial("Demo")
d. Html.RenderPartial("Demo")
Reveal Answer
Packages
Gold Membership
Microsoft Azure Suite &Suite Plus
Azure DevOps Expert &Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Resources
Blog
Deccansoft
AzureA2Z
Wall of Fame
On-Job Tech Support
About
About BestDotNetTraining
About Trainer
Testimonials
FAQ
Other links
About Us
Contact Us
Leave us a feedback
Sitemap
Privacy Policy
Terms & Conditions
Proudly Powered by