Is there a codebehind page for the content page in Master pages?

  • Thread starter Thread starter Learner
  • Start date Start date
L

Learner

Hello,
This is first time I have started using Master Pages. I am using
ASP.NET 2.0 (VB) in Visual Studion 2005. This is how I am doing it...

I have created a master page and placed a ContentPlaceHolder. And then
by right cliking on the project I added a content page (by leaving the
master page check box checked), ContentPage1.aspx. I have placed few
text box controls and and couple of radio buttons. When I browse the
page it perfectly displays in the Master page and I am fine with that.

But when I wanted to write some code for the button click event I don't
see a codebehind associated with it! When I double clicked the button
it opened an inline (button event got generated in the ContenPage1.aspx
instead of its code behind page.

Now, my question is don't we see codebehind pages for the content pages
that go into the ContentPlaceHolder control?

Please help me understand this.

Thanks-L
 
When you create the new item there are two checkboxes. One to enable
code-behind for the content page and the other to select which Master to use
the content page with. Make the content page over and "check" it out ;-)

<%= Clinton Gallagher
 
Hello Clinton,
Oh cool! I understand now. I had seen that check box before but thought
it could be for some other purpose :)

Thank you,
-L
 
Back
Top