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
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 8/9/2007 3:14:55 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 20 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
Magnussen
Asp.Net User
Detecting from MasterPage If Page Loads a Certain Control8/9/2007 3:14:55 AM

0/0

I have a global master page with sub pages and a few sub master pages.

On some pages, I load a custom user control named 'ModalPanel' (I'm sorry to say that the modal panel that comes with the AJAX Toolkit doesn't do as I want) decleratively, with the custom tag; <uc:ModalPanel ID="ModalPanel1" ...

Is it possible to detect from the global master page if such a 'ModalPanel' control is loaded in a page? And even if there's a sub master page between them?

The ID of the 'ModalPanel' control could be anything, but if this isn't possible, I could give the 'ModalPanel's specific IDs and use the 'FindControl' method, but that's not exactly what I want.

johram
Asp.Net User
Re: Detecting from MasterPage If Page Loads a Certain Control8/9/2007 8:17:57 AM

0/0

The load method of the master page is called after the load method in the page, so you should be able to locate your user control there in some way.

Pseudo code:

In MasterPage Page_Load:

bool containsModalPane = false; 
foreach (Control ctrl in Page.Controls)
{
  if (ctrl is ModalPane)
  {
    containsModalPane = true;
    break; 
  } 
} 

Note: I haven't compiled this code so I dunno if it works. Good luck!


If this post was useful to you, please mark it as answer. Thank you!
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET for SQL Server: High Performance Data Access for Web Developers Authors: Brennan Stehling, Pages: 408, Published: 2007
Mastering Web Development with Microsoft Visual Studio 2005 Authors: John Paul Mueller, Pages: 822, Published: 2005

Web:
How to prevent MasterPage post back the master page is just another control on the page that uses it, its ... either by bypassing the event or within this method to detect and ...
TheMSsForum.com >> Asp >> asp.net master page question - The ... It's refrencing that control's properties to change it to true if they are. Any discriptive help would be apreciated. Tag: asp.net master page question Tag: ...
Masterpage and 2 contentplaceholder:how to communicate? - Hannes ... If you are using master pages and having more than 1 contentplaceholder control ... load MasterPage 1, I get that the page "Content3" control points to an ...
Custom control validation - ITtoolbox Groups Jul 23, 2008 ... It is used to detect spammers.If you enter anything into this text ... i think u have call custom control in master page. so this code help ...
.NET ASP.NET Re: How to prevent MasterPage post back the master page is just another control on the page that uses it, ... can't tell if the postback occurred because of button in MasterPage or ...
CodeProject: MasterPages reinvented - a Component Based Template ... NET web forms according to certain requirements (e.g., to put controls into a .... Check if there is some control over the page with the same ID that some ...
Page Members (System.Web.UI) Master, Gets the master page that determines the overall look of the page. ..... Load, Occurs when the server control is loaded into the Page object. ...
MOSS 2007 WCM Development Part 1 - Custom Breadcrumb control « ASP ... But incorrectly when control is in the sharepoint master page. ... Could not load file or assembly ‘AspnetCoe.WebControls’ or one of its dependencies. ...
|| FAQ of the DAY || Step 2: Put below code inside the content page load event. FAQ00016_2. Labels: ASP.NET .... NET Master Page. If you are frequent visitor of any ASP. ...
Visual Web Developer Team Blog : JScript IntelliSense FAQ Nov 18, 2008 ... No, you do not need to repeat the script references on each content page. Visual Studio 2008 will auto-detect the presence of a master page ...




Search This Site:










how i will assign user rights to a directory or file

question about authentication timeout if user is not using the web app for a certain time

service controller permission?

custom asp.net membership provider

set focus to user name text box in login control?

forms authentication

idea to solve the current shared hosting ‘full trust’ issue.

roles.getallroles using objectdatasource

user login problem with website

how far can you rely on ispostback property?

can windows and basic authentication co-exist?

password requirements using createuserwizard

problem with context

problem in showing image in login.aspx

which aspnet_regsql wizard is recommended on a win 2003 server x64 with .net 64-bit and .net 32-bit framework?

enter profile of registered user.

delete a member from aspnet.mdf by a button in webpage

authentication with multiple servers

loginview control info

different access level

redirecting user to the "timeout.aspx" page when the timeout

login from page other then main!!

user profile/security audit logs

how do i block local intranet access to *some* vpn users on .net 1.1 framework?

could someone tell me what is the easiest way to generate user password in sql 2005? thanks!

my company has locked down my desktop and now i cannot build asp.net apps

custom profile data to xml to stored procedure for table based profile data.

how can i implement single sign on system on an asp.net project?

forms authentication mode causes endless loop

cannot create user unless logged in

  Privacy | Contact Us
All Times Are GMT