CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 6/27/2006 3:00:40 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 18 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
daz
Asp.Net User
masterpage and custom controls6/27/2006 3:00:40 AM

0/0

Hi - I'm utilising a MasterPage that contains a custom control (.ascx) that will display custom advertisements. I've got other pages (.aspx) within the website that use the MasterPage, and also include a different custom control that displays other content. This other content is what determines the type of advertisement to display in the MasterPage code.

Now it seems that when the .aspx pages load, the MasterPage content is loaded first (which includes the .ascx advertisement code), followed by the content on the .aspx (which includes the .ascx for the content that determines the advertisement type). So obviously this means the advertisement .ascx can not determine the content type to properly decide which advertisement type to display.

Any suggestions on how to get this to work will be greatly appreciated?

tia.

daz
eric zhou
Asp.Net User
Re: masterpage and custom controls6/27/2006 7:21:57 AM

0/0

check this link http://odetocode.com/Articles/450.aspx

master page is a children control of the page , so the page should be load first.


http://zhouruifu.spaces.live.com/
daz
Asp.Net User
Re: masterpage and custom controls6/29/2006 4:13:20 AM

0/0

thanks for the pointer.

so the approach I'm trying is to access each control from the .aspx in the Page_Load. I'm able to access the controls, but neither have been loaded at that point, so I'm still not able to determine the type of content in order for the advertisement control to know which ad to display

protected

void Page_Load(object sender, EventArgs e)

{

   System.Web.UI.Control footer = Master.FindControl("footerAd");

   System.Web.UI.Control theContent = this.theContent;

}

any suggestions as to where I should try to access the controls so that they've all been loaded?

thanks

daz
Asp.Net User
Re: masterpage and custom controls6/29/2006 4:55:03 AM

0/0

nevermind - looks like I got it... thanks
isley
Asp.Net User
Re: masterpage and custom controls7/20/2006 2:12:14 PM

0/0

What was the solution?
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
SharePoint 2007 and Office Development Expert Solutions: Expert Solutions Authors: Randy Holloway, Andrej Kyselica, Steve Caravajal, Pages: 324, Published: 2007
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
ASP.NET 2.0: A Developer's Notebook Authors: Wei Meng Lee, Pages: 326, Published: 2005
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005
Foundations of ASP.NET AJAX Authors: Robin Pars, Laurence Moroney, John Grieb, Pages: 268, Published: 2007
Real World SharePoint 2007: Indispensable Experiences from 16 MOSS and WSS MVPs Authors: Robert Bogue, Adam Buenz, Scot Hillier, Andrew Connell, Stacy Draper, Luis Du Solier Grinda, Todd Klindt, Jason Medero, Dustin Miller, Shane Perran, Joris Poelmans, Heather Solomon, Nick Swan, Jan Tielens, Mike Walsh, Shane Young, Pages: 504, Published: 2007
Visual Basic 2008 For Dummies Authors: Bill Sempf, Pages: 360, Published: 2008
Pro C# with .NET 3.0: exploring the .NET universe using curly brackets Authors: Andrew Troelsen, Pages: 1186, Published: 2007

Web:
Masterpage and Contentpage with Custom Control get no event - DevX ... The problem is that it seems that the events no more fire to the custom control when the contentpage is inside the masterpage. ...
master pages with custom controls - ASP.NET Forums master pages with custom controls. Last post 01-31-2008 11:55 AM by orzeh. 3 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
Consistent development of Master Pages, Page Layouts and User ... Out of the box Master Pages and Page Layouts using different tag prefixes ... You can define a tag prefix for custom control in the web.config of your Web ...
Page 3 - Combining WebParts and Master Pages - Using VS Combining WebParts and Master Pages - ' Creating a Custom Control ' ( Page 3 of 4 ). Creating a Custom Control. After you place the WebPartManager in the ...
Feedback: Web parts with custom controls and using master pages when using a web site based on master pages, if I have a content page with webpart zones and I place a custom control in the web part, when the page is ...
CodeProject: How To Develop Cascading Master Pages in ASP.NET ... Nov 9, 2004 ... Article shows a very simple but powerful way to use Cascading Master Pages design pattern in .NET without using Custom Controls. ...
ASPAlliance.com : The #1 ASP.NET Developer Community : Paul ... This custom version of Microsoft's MasterPages demo Page Templating controls now has design-time support and performs faster, and adds a few default ...
Extending System.Web.UI.Page/MasterPage with custom properties Talk about Extending System.Web.UI.Page/MasterPage with custom properties. ... controls, but never worked with extending a page. ...
Developing a Custom Master Page (Master Pages and SharePoint part ... Oct 6, 2008 ... Developing a Custom Master Page (Master Pages and SharePoint part 3 of 6) .... Some examples of controls you don’t want to remove are: ...
Create Custom Menu under Master pages using sharepoint : MOSS 2007 ... You can create custom .net controls (.ascx) to use in Master Pages for SharePoint just as you would for a Master Page in ASP.NET. You just need to make sure ...

Videos:
MOSS UI Tutorial: Part 6 This is a 10-Part screencast series on how to apply custom visual design to a MOSS website. Part 6 demonstrates how to create a custom page layout, a...
MOSS UI Tutorial: Part 9 This is a 10-Part screencast series on how to apply custom visual design to a MOSS website. Part 9 demonstrates some tips for how to style the menu c...




Search This Site:










missing admin/security files in 2.1.2

error in dnn - can't delete or update pages

skinning questions

multiple portals, multiple admins

asp.net 2.0 product design changes between beta 1 and beta 2

critical error surveys

how to create a group of users in windows 2000 active directory

problem in setting permissions on remote share from website

problem in using the .net roles and membership

understanding repeaters

safest way to grant file writing permissions on our server?

return statement

changing my guestbook display - is gridview viable for this display

why is my vwd express ide so slow?

unable to ctrl+f5 or debug.

using web parts with master pages

how to download a file using a .net object

second menu system

site works in firefox, but not ie

dnn 4.0 installation errors

error: unable to start debugging on the web server

c# windows app to c# web app

search module for 2.0.4

what would be the best way to add custom forms to the portal

free photo album module dnn 2.0

dynamic asp.net links

how to retrive those that have no record

dnn4 install error

dotnetnuke 2.0.2 beta 3 available...

list of all query execution times for a page

 
All Times Are GMT