PC Review


Reply
Thread Tools Rate Thread

communicating with Masterpage from UserControl

 
 
wildman@noclient.net
Guest
Posts: n/a
 
      25th Feb 2008
I have a Master page with property for ErrorMsgs. From my aspx pages I
can set that property resulting in a popup.

Whats the best way to have that same result from a user control. Say I
get an error in my usercontrol and I want to trip that popup in the
masterpage?

Thanks for any help or information.
 
Reply With Quote
 
 
 
 
wildman@noclient.net
Guest
Posts: n/a
 
      25th Feb 2008
On Feb 25, 2:17*pm, wild...@noclient.net wrote:
> I have a Master page with property for ErrorMsgs. From my aspx pages I
> can set that property resulting in a popup.
>
> Whats the best way to have that same result from a user control. Say I
> get an error in my usercontrol and I want to trip that popup in the
> masterpage?
>
> Thanks for any help or information.



FYI.

On the pages I would add this below the directive:

<%@ MasterType VirtualPath="~/MyMaster.master" %>

But, I can't add that to the user control.

I can reference the master page from the user control with

Page.Master but my property (of the master) does not show up:

My property on the master looks like this:


Partial Class xxx
Inherits System.Web.UI.MasterPage

Public Property ErrorMsg() As String
Get
Return ErrorLabel.Text
End Get
Set(ByVal value As String)
ErrorLabel.Text = value
End Set
End Property


But Page.Master.ErrorMsg is say it's not a member of
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exposing UserControl in a MasterPage =?Utf-8?B?RGFsZQ==?= Microsoft ASP .NET 2 2nd Oct 2007 06:01 PM
Finding/Referencing a UserControl on a Page or MasterPage =?Utf-8?B?QWxleCBNYWdoZW4=?= Microsoft ASP .NET 2 7th Jul 2006 10:43 AM
Usercontrol derived from Usercontrol - masterpage init is fired tw =?Utf-8?B?Q2FwdGFpbiBTZW5zaWJsZQ==?= Microsoft ASP .NET 0 3rd Feb 2006 03:39 PM
updateproblem with usercontrol, page and masterpage Alexander Widera Microsoft ASP .NET 2 15th Dec 2005 03:54 PM
(v 2.0) MasterPage for UserControl Sergio Pereira Microsoft ASP .NET 0 11th Jun 2005 06:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:48 PM.