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: 12/8/2006 6:40:11 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 23 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
ujjaval
Asp.Net User
calling a master page's method from user control12/8/2006 6:40:11 AM

0/0

Hey all,

 I have a user control on an aspx page which has a master page. That master page has a method, which I need to call from the user control's button click event. How can i access master page's method from a user control which is used on an aspx page?

 Thanks,

Ujjaval
 

DMW
Asp.Net User
Re: calling a master page's method from user control12/8/2006 9:57:43 AM

0/0

One way of doing this is as follows:

1. Define an interface in your App_Code folder, and on this interface define the methods that you want to expose from the Master Page.
2. Have the Master Page implement the interface.
3. In the user control, you can then access the Page.Master property. Cast this to the interface you defined in 1 using trycast (in Visual Basic) or as in C#.
4. If the result of 3 is not null/Nothing, then call the method.

 


Dave
ujjaval
Asp.Net User
Re: calling a master page's method from user control12/10/2006 12:56:45 PM

0/0

Hey Dave,

 That worked just fine. Thanks for your help.

 Ujjaval

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 2.0 Website Programming Authors: Damon Armstrong, Pages: 641, Published: 2005
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
ASP.NET 2.0 Instant Results Authors: Imar Spaanjaars, Paul Wilton, Shawn Livermore, Pages: 456, Published: 2006
Beginning ASP.NET 2.0 E-commerce in C# 2005: From Novice to Professional Authors: Cristian Darie, Karli Watson, Pages: 681, Published: 2005
ASP.NET 2.0 All-In-One Desk Reference For Dummies: all-in-one desk reference for dummies Authors: Doug Lowe, Jeff Cogswell, Ken Cox, Pages: 910, Published: 2006
Mastering Web Development with Microsoft Visual Studio 2005 Authors: John Paul Mueller, Pages: 822, Published: 2005
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
Beginning ASP.NET 2.0 with C# Authors: Chris Hart, John Kauffman, David Sussman, Chris Ullman, Pages: 735, Published: 2006
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
ASP.NET AJAX Programmer's Reference: With ASP.NET 2.0 Or ASP.NET 3.5 Authors: Shahram Khosravi, Pages: 1522, Published: 2007

Web:
Calling a Master Page User Control from a Page User Control - Eric ... Jan 5, 2007 ... The idea is to have a method in the master page that takes a ... across my master pages for accepting messages from pages and user controls. ...
calling a master page's method from user control - ASP.NET Forums calling a master page's method from user control. Last post 12-10-2006 7:56 AM by ujjaval. 2 replies. Sort Posts: ...
Inside ASP.NET Master pages Master pages are actually user controls. When you see the code file of your master ... To access controls inside the master page, there are two methods: ...
Tip and Tricks: ASP.NET 2.0 AJAX 1.0 Extensions and Master Pages ... I have a user control(TreeView) in a master page, ... Title: Calling JavaScript Methods using ScriptManagerProxy Name: Nasir Ibrahim ...
CodeProject: How To Develop Cascading Master Pages in ASP.NET ... Nov 9, 2004 ... The user control is tested to function properly when included in a ... Cascading effect was possible by calling master pages from the top of ...
How to call a method in a MasterPage from a class? I have no problem to call the masterpage's methods from a contentpage, but ..... User Control Panel, Private Messages, Subscriptions ...
ASP.NET.4GuysFromRolla.com: Passing Information Between Content ... Jan 31, 2007 ... A Master Page can expose its Web controls or methods directly to its .... to Master Pages (the User Control) and content pages (the ASP. ...
How to call a function in a master page from a user control : call ... I have a user control in a page that uses a Master page, I want to do the following, if a button clicked inside the user control, in the click event I call ...
How to call a method in a MasterPage from a class? User. > I have no problem to call the masterpage's methods from a ... WebControl implemented as nested in UserControl or Page class ...
Calling methods in the Master Page advice Default Calling methods in the Master Page advice. Hi, I have a master page with a literal control. As an example, I'm trying ...

Videos:
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...
Using ROSE to Mitigate Performance Trade-offs Google TechTalks April 03, 2006 Daniel Quinlan ROSE is a tool for building source-to-source transformation tools for the optimization of C and C++ ...
Exploratory Testing Google Tech Talks March 16, 2006 Jon Bach




Search This Site:










web.config file

localization terms of use

listing connectionstrings and appsettings

hosting a webservice free of cost

isinrole - returning false. dnn 2.03

security

getting a list of authorised users

dynamic content within master pages

howto fix error message: server error in '/' application

getting started

required to login again, after initial login, when navigating to different page.

is there a way to force new module into specific pane?

login control database hassle

treeview problem when using ie7

urgent : backward compatibility between .net 1.1.4 and 2.0

[dnn 2.0.3] no search? is there an alternative?

site develolpment help

reading a parameter in the url query string

aligning the main view area in the wizard control

form wizard, embeaded if statements options

performance issues with the dotnetnuke site

putting & in my html view becomes "&amp;"

problem: individual assemby:.cs files

problems debugging vs.net on terminal server

retrive a file from a binary data field

how to define dynamic 2d array?

several form tags in one page

dotnetnuke.1.0.* class browser

using sha1 to hash passwords in 1.1 not playing nice in 2.0

how to do this in dnn?

 
All Times Are GMT