1

Resolved

Attempting to set text to Empty / null after link label has text doesn't work

description

If you have a LinkLabel, assign some text and then assign the text to String.Empty / null the update won't work. There are several places in the code which cause the issue, but this is one of the more obvious places:
 
        if (this.layoutRoot == null || string.IsNullOrEmpty( this.Text ) )
        {
            return;
        }
 
So, if we're attempting to set the text, and the text is empty, it just quits out early. No processing is done, and therefore all the children aren't removed from the layout root.

comments

Emil wrote Oct 29, 2008 at 8:18 AM

I see... I'll fix that until the end of the week. Thank you.

Emil wrote Oct 31, 2008 at 6:39 AM

Applied a fix in the latest source code.

wrote Oct 31, 2008 at 6:39 AM

wrote Feb 13, 2013 at 6:35 PM

wrote May 16, 2013 at 3:32 AM

wrote May 16, 2013 at 3:32 AM

wrote Jun 14, 2013 at 7:12 AM