Can't assign text to DotNetNuke LabelControl in Page_Load event.

I wanted to assign text of the LabelControl , so in the user control Page_Load  function I've added code like this:

If Page.IsPostBack = False Then

If  bSetCaptionInCode Then

   Me.plUsername.Text = "Your User NAME:“

end if

End If

Unfortunutely, it didn't work and the label was not changed.

After some research I found , that LabelControl's text is populated  from resources during LabelControl's Load event , which is later than container UserControl Load event.

So if I want to overwrite text from resources , I have to do it in PreRender event.

I think that it should be possible(?) to assign Resources strings in LabelControl during Init, not Load event.

There should NOT be If Page.IsPostBack = False Then condition, because LabelControl reloads GetLocalizedText on each call

posted @ Wednesday, March 08, 2006 2:33 PM

Print

Comments on this entry:

No comments posted yet.

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345