.NET and ASP.NET interview questions: – Explain steps of createing a simple “Master Page” in ASP.NET?

Master Page: – Master pages let you make a consistent layout for your application, you can make one master page that holds the layout/look & feel and common functionality for your whole application and upon this master page, you can build all the other pages, we call these pages Content Pages. So simply you can build your master page and then build content pages, and while creating the content pages you bind them to the master page you have created before, those two pages are merged at runtime to give you the rendered page.

Let’s see a practical demonstration how exactly we can create “Master Page” in your application.

In order to create a simple “Master page” you need to follow the following steps.

Step 1: – Create a new project > select ASP.NET Empty Web Application.

Step 2: – Right click on the project > select Add >Add new item > select “Master Page” and click Add.

As soon as you click on Add a new file will be created with .master extension like below diagram.

Step 3: – Now just place the content’s you want to keep constant in our application.

Step 4: – just follow the below diagrams to add forms to our application.

Right click on the project > select Add >Add new item > select “Web Form using Master Page” and click Add.

As soon as you click on add, a new window will appear like below diagram from that select your “master page name” and click ok.

Similarly, if you want to add more pages in our application just follow the Step 4.

Once you have done with above steps, now you can run our application and see the output with master page.

View the following video on Single sign-on using forms authentication in ASP.NET



View more .NET and ASP.NET interview questions

Regards,

View more authors learning tutorials on .NET and ASP.NET interview questions

Advertisements

About c# and .NET Interview questions

This blog is for developers who want to crack .NET and C# interviews. It has all tips and tricks needed to crack .NET interviews , C# interview , SQL Server interview , Java interview , WCF Interview , Silverlight interview , WPF interview , LINQ interview , Entity framework Interview. Do not forget to watch our Learn step by step video series. Learn MVC in 16 hours:- https://www.youtube.com/watch?v=Lp7nSImO5vk Learn AngularJS Step by Step:- https://www.youtube.com/watch?v=0kmdjqgO9IY Learn Design Pattern in 8 hours:- https://www.youtube.com/watch?v=YDobmucohqk Learn C# and .NET in 60 days:- https://www.youtube.com/watch?v=yh2SrzCkNQA Learn MSBI in 32 hours:- https://www.youtube.com/watch?v=mGPJx3ocFgg Learn SharePoint Step by Step in 8 hours:- https://youtu.be/C2fW76SwJNU
This entry was posted in Uncategorized and tagged , , , , , , , . Bookmark the permalink.

One Response to .NET and ASP.NET interview questions: – Explain steps of createing a simple “Master Page” in ASP.NET?

  1. dhiraj says:

    In title of this blog ,modify the spelling of “creating”,,,, its not “createung”——-
    createing a simple “Master Page”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s