473,395 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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

Mar 7 '06 #1
2 1412
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

"Learner" <pr****@gmail.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
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

Mar 7 '06 #2
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

Mar 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nathan | last post by:
Hi, I seem to having a peculiar problem with the display of odd and even pages in XSL-FO. Here is a small background of the problem. My xsl stylesheet mentions my fo:layout-master-set as ...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
1
by: Daves | last post by:
I am using the codebehind in my masterpage to set some global variables which all children (content) pages use, for example the DB connection string. It seems the master page code is run AFTER the...
7
by: sasquatch | last post by:
Hi, I've a a site with nested master pages and content pages. I tried using a theme with a stylesheet in the app_themes directory referencing it in the web.config file from a pages tag theme...
2
by: SR | last post by:
I have started a web site using ASP.NET 2.0. I would like to centralize all of my classes in a StyleSheet but I cannot figure out how to link the StyleSheet to a Content Page since there is no...
8
by: JT | last post by:
Hi, I have done a fair amount of style editing inline in ASP. I'm now using VS 2005 with a standard web project (not Web Application Project). This is my first foray into CSS in a style sheet...
2
by: n# | last post by:
I have an old existing website with a Header/ Left Hand Menu and a iframe as the main body content, adjacent to the menu. So for every click on the menu item, I used to load a aspx page on the...
13
by: Kirk | last post by:
I have been reading Scott Allen's article on Master Pages (http:// odetocode.com/Articles/450.aspx) but I am having problems understanding a concept. Specifically, I have created a property...
6
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
I am trying to access a Public property on a Master Page from a Base Page. On the content pages I have the MasterType Directive set up as follows: <%@ MasterType virtualpath="~/Master.master" %>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.