Impact of Gen-AI on IT Jobs - Growth Mindset Show
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
1
Reply
What is ViewStart Page in ASP.Net MVC?
Ritesh Singh
9y
1.2k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
Basically by default we have master layout in Views>> Shared >> _Layout.cshtml and this thing is defined in _ViewStart.cshtml that which one is our default master layout.When we create a view with master layout by default its master layout is _Layout.cshtml, but we can change it from _ViewStart.cshtml When we write:@{Layout = null;} in our view we say that this view does not have any master layout, this is used when we create partial view mostly or a standalone view without master layout.If you open _ViewStart.cshtml by default it has this written in it:@{Layout = "~/Views/Shared/_Layout.cshtml"; } and we can change it if we want to.You can also change of some specific view Master Layout by writing on top of it the url of master layout view:@{Layout = "~/Views/Shared/_CustomMasterLayout.cshtml";}
Samatha Reddy
8y
0
What is Layout in ASP.Net MVC?
Use of private Constructor in Singleton Design pattern.
Message