Welcome Guest Search | Active Topics | Sign In | Register

Write to controls in Masterpage Dialog from c# Options
Duane
Posted: Wednesday, June 29, 2011 4:09:37 PM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
Hello,

I have been trying [unsuccessfully] to update an asp:Label control in the Masterpage dialog from my web page code file.

I can get a reference to the dialog and update the HeaderHtml property, but I have not been able to update the label controls .Text in the ContentTemplate from the page code file.

Here's how I am writing to the .HeaderHtml property:

Code: C#
EO.Web.Dialog ErrorDialog = (EO.Web.Dialog)Master.FindControl("eo_dlg_ErrorMessage");
ErrorDialog.HeaderHtml = "Message Header";
// how do I access the <asp:Label control from here...


How would I access, and update the Dialog ContentTemplate controls?

Thanks
eo_support
Posted: Thursday, June 30, 2011 9:49:56 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Once you have the Dialog control, you can call FindControl on the Dialog's ContentContainter to find controls inside the dialog. ContainerContainer exposes the root control of the dialog's content.

Thanks!
Duane
Posted: Thursday, June 30, 2011 1:50:27 PM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
Yes, worked like a charm.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.