Geeks With Blogs

News My Blog has been MOVED to https://mfreidge.wordpress.com
Michael Freidgeim's OLD Blog My Blog has been MOVED to https://mfreidge.wordpress.com

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 on Wednesday, March 8, 2006 2:33 PM DotNetNuke , ASP.NET | Back to top


Comments on this post: Can't assign text to DotNetNuke LabelControl in Page_Load event.

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net