Adding links to LinkButtons in Master Page Navigation using Response.Redirect() function in ASP.NET

In this tutorial on dynamic web application development, we will add links to the link buttons on the master page. Since the link buttons are ASP link buttons they run at server side. Hence we will add C# code on every link buttons onclick event. The code we will use is Response.Redirect() function which is used to redirect users to a new link address specified as an string argument in the function parameters.

What is Master Page in ASP.NET ?
  • Master pages allow you to create a consistent look and behavior for all the pages (or group of pages) in your web application.
  • A master page provides a template for other pages, with shared layout and functionality. The master page defines placeholders for the content, which can be overridden by content pages.
  • The output result is a combination of the master page and the content page.
  • The content pages contain the content you want to display.
  • When users request the content page, ASP.NET merges the pages to produce output that combines the layout of the master page with the content of the content page.
  • More Info on Master Page – https://docs.microsoft.com/en-us/previous-versions/dct97kc3(v=vs.140)?redirectedfrom=MSDN

Watch the video tutorial at the end of this video to understand more about how to create master page & apply custom styling. Use the code given below.

Download all Images for this project – CLICK HERE

Site1.Master code –
Site1.master.cs code –
YouTube video tutorial –

Leave a Reply

Your email address will not be published. Required fields are marked *