Questions tagged [master-pages]

a feature of ASP.NET that allows template-based page development.

ASP.NET 2.0 introduced the concept of "master pages", which allow for template-based page development. A Web application can have one or more master pages, which, beginning with ASP.NET 2.0, can be nested. Master templates have place-holder controls, called ContentPlaceHolders to denote where the dynamic content goes, as well as HTML and JavaScript shared across child pages.

Child pages use those ContentPlaceHolder controls, which must be mapped to the place-holder of the master page that the content page is populating. The rest of the page is defined by the shared parts of the master page, much like a mail merge in a word processor. All markup and server controls in the content page must be placed within the ContentPlaceHolder control.

When a request is made for a content page, ASP.NET merges the output of the content page with the output of the master page, and sends the output to the user.

The master page remains fully accessible to the content page. This means that the content page may still manipulate headers, change title, configure caching etc. If the master page exposes public properties or methods (e.g. for setting copyright notices) the content page can use these as well.

2947 questions
0
votes
2 answers

Access textbox value in a header in a master page to .aspx.vb page

I created a textbox and a submit button in header(User Control) included in a master page and I want to use that textbox value after clicking submit in my .aspx.vb page. How can i access that, as the vb page is loaded first and then master page is…
Ashu Gud
  • 73
  • 2
  • 3
  • 10
0
votes
2 answers

Change the background of selected LI using JQuery

I want to change the background color of LI Tag that I have clicked.... But the problem is , that the code(both JQuery and LI list) is on masterpage(Admin.master) , I have written the following code on Admin.Master page...But it doesnt seem to…
Vegeta
  • 291
  • 2
  • 7
  • 20
0
votes
1 answer

Make UserControl Visible after Logging In

I have a popup login usercontrol in a masterpage, once logged in I want another usercontrol on a content page to appear automatically, currently it only appears if I manually refresh the page. How can this be accomplished. Thanks. MasterPage - >…
Aaron
  • 55
  • 1
  • 1
  • 6
0
votes
1 answer

Master Page Not Loading Properly

I have spent a couple days trying to figure out why my asp master page format and controls are being ignored when I try to access a page from my IIS 7.5 server. I'm using the basic DevStudio ASP web project and everything works when I reference the…
0
votes
4 answers

JQuery don’t work in aspx-page with Masterpage

I have made this example and it works fine on a plain aspx webpage. I use Visual Studio 2010. Head-part: Show/hide element