Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

ASP Net - Calling MasterPage Subroutines from a ContentPage

 
Thread Tools Search this Thread
Old 06-20-2006, 09:00 PM   #1
jeffmagill@gmail.com
 
Posts: n/a
Default Calling MasterPage Subroutines from a ContentPage

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

  Reply With Quote
Old 06-20-2006, 09:45 PM   #2
=?Utf-8?B?TWFya0F1cml0?=
 
Posts: n/a
Default RE: Calling MasterPage Subroutines from a ContentPage

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
>
>

  Reply With Quote
Old 06-20-2006, 09:59 PM   #3
Tod Birdsall, MCSD for .NET
 
Posts: n/a
Default Re: Calling MasterPage Subroutines from a ContentPage

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
> >
> >


  Reply With Quote
Old 06-20-2006, 10:52 PM   #4
jeffmagill@gmail.com
 
Posts: n/a
Default Re: Calling MasterPage Subroutines from a ContentPage

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
> > >
> > >


  Reply With Quote
Old 06-21-2006, 03:09 AM   #5
clintonG
 
Posts: n/a
Default Re: Calling MasterPage Subroutines from a ContentPage

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
>> > >
>> > >

>



  Reply With Quote
Old 06-21-2006, 05:54 PM   #6
jeffmagill@gmail.com
 
Posts: n/a
Default Re: Calling MasterPage Subroutines from a ContentPage

It worked prefectly. Thank you so much guys!

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47