![]() |
|
|
|||||||
![]() |
ASP Net - Calling MasterPage Subroutines from a ContentPage |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Posts: n/a
|
Is it possible? I haven't been able to find any information about this.
Not on the web, not in books. Is it possible to call a function or subroutine which is defined in a MasterPage from it's derivative ContentPage? Thanks. Jeff |
|
|
|
#2 |
|
Posts: n/a
|
In your aspx add:
<%@ MasterType virtualPath="~/<MasterPageName>.master"%> Then in its codebehind: this.Master.MyMethod() Hope this is what you needed. "" wrote: > Is it possible? I haven't been able to find any information about this. > Not on the web, not in books. > > Is it possible to call a function or subroutine which is defined in a > MasterPage from it's derivative ContentPage? > > Thanks. > Jeff > > |
|
|
|
#3 |
|
Posts: n/a
|
Hi Mark,
Thanks for pointing this out. K. Scott Allen has a more detailed, but in VB.NET, article here: http://odetocode.com/Blogs/scott/arc...7/16/1944.aspx Tod Birdsall, MCSD for .NET software blog: http://tod1d.net MarkAurit wrote: > In your aspx add: > <%@ MasterType virtualPath="~/<MasterPageName>.master"%> > > Then in its codebehind: > this.Master.MyMethod() > > Hope this is what you needed. > > "" wrote: > > > Is it possible? I haven't been able to find any information about this. > > Not on the web, not in books. > > > > Is it possible to call a function or subroutine which is defined in a > > MasterPage from it's derivative ContentPage? > > > > Thanks. > > Jeff > > > > |
|
|
|
#4 |
|
Posts: n/a
|
Thanks for your quick responses!! I'll let you guys know how it turns
out. You're welcome for point this out. If you want, I can point out more problems sooner Jeff Tod Birdsall, MCSD for .NET wrote: > Hi Mark, > > Thanks for pointing this out. K. Scott Allen has a more detailed, but > in VB.NET, article here: > > http://odetocode.com/Blogs/scott/arc...7/16/1944.aspx > > Tod Birdsall, MCSD for .NET > software blog: http://tod1d.net > > > MarkAurit wrote: > > In your aspx add: > > <%@ MasterType virtualPath="~/<MasterPageName>.master"%> > > > > Then in its codebehind: > > this.Master.MyMethod() > > > > Hope this is what you needed. > > > > "" wrote: > > > > > Is it possible? I haven't been able to find any information about this. > > > Not on the web, not in books. > > > > > > Is it possible to call a function or subroutine which is defined in a > > > MasterPage from it's derivative ContentPage? > > > > > > Thanks. > > > Jeff > > > > > > |
|
|
|
#5 |
|
Posts: n/a
|
You'll be back
<%= Clinton Gallagher NET csgallagher AT metromilwaukee.com URL http://www.metromilwaukee.com/clintongallagher/ <> wrote in message news: oups.com... > Thanks for your quick responses!! I'll let you guys know how it turns > out. > > You're welcome for point this out. If you want, I can point out more > problems sooner > > Jeff > > Tod Birdsall, MCSD for .NET wrote: >> Hi Mark, >> >> Thanks for pointing this out. K. Scott Allen has a more detailed, but >> in VB.NET, article here: >> >> http://odetocode.com/Blogs/scott/arc...7/16/1944.aspx >> >> Tod Birdsall, MCSD for .NET >> software blog: http://tod1d.net >> >> >> MarkAurit wrote: >> > In your aspx add: >> > <%@ MasterType virtualPath="~/<MasterPageName>.master"%> >> > >> > Then in its codebehind: >> > this.Master.MyMethod() >> > >> > Hope this is what you needed. >> > >> > "" wrote: >> > >> > > Is it possible? I haven't been able to find any information about >> > > this. >> > > Not on the web, not in books. >> > > >> > > Is it possible to call a function or subroutine which is defined in a >> > > MasterPage from it's derivative ContentPage? >> > > >> > > Thanks. >> > > Jeff >> > > >> > > > |
|
|
|
#6 |
|
Posts: n/a
|
It worked prefectly. Thank you so much guys!
|
|