CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 6/25/2007 1:43:27 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 12 Views: 39 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
13 Items, 1 Pages 1 |< << Go >> >|
michael.cole
Asp.Net User
Master Page/Content Page problem6/25/2007 1:43:27 PM

0/0

I have Master Page and Content Page set up that are displaying correctly. However, when I try to put various controls on my Content Page, I get an error saying it needs to be put in a forms tag with runat=server. I have the forms tag on my Master Page with the runat=server, so I get an error saying I can't have two forms tags when I try to add it to my Content Page.

Any suggestions? I seem to find a lot of chatter about this when I google it, but can't find a good solution anywhere.

naturehermit
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 1:55:34 PM

0/0

As long as you put controls with in the content tags, it shouldnt be an issue. If you put up your code here. I can help...perhaps???


Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
michael.cole
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 2:30:08 PM

0/0

Thanks for the prompt reply!

 Here is the Source of my Content Page:

 

1    <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/AmNet.Master" CodeBehind="CMTRates.aspx.vb" Inherits="RAF.InterestRates.WebUI.CMTRates" 
2        title="Historical CMT Interest Rates"%>
3    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
4        <div id="content_title_2">Historical CMT Interest Rates</div>
5    	<div id="content_main">
6    	    <asp:label id="lblErrorMessage" runat="server" Width="90%" ForeColor="Red"></asp:label>
7            <asp:ImageButton ID="imgExcel" runat="server" ImageUrl="images\excel_icon.jpg" Height="30" Width="30"/>
8    	</div>
9    </asp:Content>
10   
11   

 Here is the error message I am getting:

Control 'ctl00_ContentPlaceHolder1_imgExcel' of type 'ImageButton' must be placed inside a form tag with runat=server.

naturehermit
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 2:57:26 PM

0/0

I am little intrigued by it..but may i ask why the inherits attribute is not same as the class as the default that the framework generates for you is the classname..Inherits="RAF.InterestRates.WebUI.CMTRates"...i would have it same name as the class unless you have reasons to do so..

 

The framework generates same name as the class because it generates the controls in the proxy class with the same names.

 

Another thing you can try is to add the reference to master as

<%@ MasterType VirtualPath="~/xx.master%>


Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
michael.cole
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 3:18:23 PM

0/0

I changed the namespace of my page so it fit into our namespace standards.  I have never had a problem with changing it before.

Where would I add that reference?  I added it before and after the Page stuff and got an error both places.

naturehermit
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 3:21:04 PM

0/0

Below the @page directive.Is this a project or a website.


Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
michael.cole
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 3:32:36 PM

0/0

I added it, and here is my update code:

  

1    <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/AmNet.Master" CodeBehind="CMTRates.aspx.vb" Inherits="RAF.InterestRates.WebUI.CMTRates" 
2        title="Historical CMT Interest Rates"%>
3    <%@ MasterType VirtualPath="~/AmNet.master"%>
4    
5    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
6        <div id="content_title_2">Historical CMT Interest Rates</div>
7    	<div id="content_main">
8    	    <asp:label id="lblErrorMessage" runat="server" Width="90%" ForeColor="Red"></asp:label>
9            <asp:ImageButton ID="imgExcel" runat="server" ImageUrl="images\excel_icon.jpg" Height="30" Width="30"/>
10   	</div>
11   </asp:Content>

 

However, I still get the error.  This is a project.

michael.cole
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 3:34:00 PM

0/0

Duplicate post... sorry.

naturehermit
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 3:41:35 PM

0/0

I want to know why that inherites attribute is not the same as the class name..any reason..could you try by removing it..and then sort the errors out and then add the reference.

 

cheers


Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
michael.cole
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 3:53:41 PM

0/0

Where are you seeing my class name?

I changed the root namespace of my project in the project properties.  I got an error when I ran the application because it couldn't find the class it was trying to inherit, so I changed it to the full name.

naturehermit
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 3:59:51 PM

0/0

Sorry my mistake..didnt see that you have modified it as I needed to scroll. Could you also put the code for your master page just from the form onward please..and remove anything that you do not want me to see.


Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
michael.cole
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 4:12:41 PM

0/0

Actually, I found the problem when I was looking in the code of my Master page.  I had tried to incorporate a template provided to me from a non-ASP.NET developer, and somehow I closed the form tag right after I opened it.  DOH!  Thanks for the guidance.

naturehermit
Asp.Net User
Re: Master Page/Content Page problem6/25/2007 4:16:49 PM

0/0

Glad you got it..Do I get a point for it ...doh...:P

 


Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations
13 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 954, Published: 2007
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Mastering Web Development with Microsoft Visual Studio 2005 Authors: John Paul Mueller, Pages: 822, Published: 2005
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006

Web:
How to: Reference ASP.NET Master Page Content You can write code in content pages that references properties, methods, and controls in the master page, with some restrictions.
ASP.NET Master Pages Overview The control tree for a merged master and content page looks something like this: ... NET can merge the content and master pages into a single rendered page. ...
ASP.NET QuickStart Tutorials This works fine when the Master Page and Content Page are in the same directory, ... To solve this problem, you may take one of the following approaches: ...
ASP.NET.4GuysFromRolla.com: Passing Information Between Content ... Jan 31, 2007 ... Passing Information from a Content Page to its Master Page ... Using this method , the Master Page's content page can set the text displayed ...
Master Page content page pass value problem I got a problem with my master page. It seems like my content page can't retrieve variable value from master page. ...
ASP.Net 2.0 - Master Pages: Tips, Tricks, and Traps Apr 11, 2006 ... Obviously, problems will occur if the content page’s Load event handler depends on the master page's Load event to finish some work or ...
Master page/content page postback problem - DevX.com Forums Master page/content page postback problem ASP.NET. ... I tried some non-input content pages using this master page and everything is OK. ...
Visual Studio 2008 MasterPage; content page error. - MSDN Forums Sep 28, 2007 ... Added a master page; deleted the Head ConentPlaceHolder. from the masterpage I created a content page and I got the same error. ...
ASP.NET 2.0 Tutorials : Creating Content for Master Page ASP NET 2 0 Tutorials Creating Content for Master Page In this tutorial you will learn how to create contents for a Master Page create a home page add ...
Events in Master page / Content Pages May 15, 2007 ... Master page child controls load: The server controls on the master page are loaded onto the page. Content page child controls load: The ...

Videos:
Jehovah's Witnesses - Part 1 http://matthewsgeneration.blogspot.com/2008/01/out-of-north.html See the book here: http://thebiblereport.blogspot.com/ Get the book here: http:/...
Jehovah's Witnesses - Part 2 http://matthewsgeneration.blogspot.com/2008/01/out-of-north.html See the book here: http://thebiblereport.blogspot.com/ Get the book here: http:/...
A New Way to look at Networking Google Tech Talks August 30, 2006 Van Jacobson is a Research Fellow at PARC. Prior to that he was Chief Scientist and co-founder of Packet Design. P...
Johnny Rivers & John Lee Hooker Walking the Dog 2008 Mashup If the Elite's NWO master Plan for Utopia is so great then why all the wars, death, destruction, starvation, SECRECY and LIES? I see all countries ar...
McCain Palin JWO Jew World Order OWO Old World Order If the Globalist's NWO master Plan for Utopia is so great then why all the wars, death, destruction, starvation, SECRECY and LIES? I see all countrie...
The Innovators - Derek Franklin Our first Innovator is Derek Franklin. Derek talks to Technology Evangelist about his passions: Flash and Search. How can one man take on the behemot...
Robert Anton Wilson explains Quantum Physics If the Elite's NWO master Plan for Utopia is so great then why all the wars, death, destruction, starvation, SECRECY and LIES? I see all countries ar...
The Harvard Yard LaRouche Youth Fan Trailer Full Presentation http://ca.youtube.com/watch?v=wSk3OIrhDfA Resource site http://wlym.com/drupal/ If the Globalist's NWO master Plan for Utopia is so...
Dan Brown - Martin Luther - Da Vinci code - protestant discovery? The Roman Catholic Church was involved in a much greater hoax - one that deals with the very foundations of history itself. For excerpt, TOC, 'Search...
Fox News and Frank Luntz Caught Red Handed Focus Group Fraud If the Elite's NWO master Plan for Utopia is so great then why all the wars, death, destruction, starvation, SECRECY and LIES? I see GWB passed some ...




Search This Site:










menu navigation control overlapping with text labels - need help, please

treeview

help with sitemap object

customising navigation menu.

menucontrol selected property

contentplaceholders

clinet side scriptin in master pages using javascript

printer friendly page using a querystring in masterpage and pagelayouts

sqlsitemapprovider process

how to use javascript in masterpage

using menu as site navigation

theme and custom 404 page

accessing controls on a masterpage

how to set meta tags while using master page?

master pages, cookies, session variables and life

images in master page path gets lost

asp:menu control

meta tag & navitation with <a> tag

can't keep my menu events straight

property in master pages

designer support for nested master pages

masterpages and system.web.ui.webcontrols.menu: an unholy mess!

treeview with a collection of custom treeviewnodes

treeview and javascript

can you load a certain profile

asp menu using sitemapdatasource

is there anyway to divide a dynamic menu into sections

menu control html code is huge

control rendering of treeview's nodes when databound to sitemapprovider?

web site map question

  Privacy | Contact Us
All Times Are GMT