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

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
 
C

clintonG

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
 
L

Learner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top