JavaScript injection is preferrable as it works reliable under all environments except when JavaScript is off. Controls.Add() can have problems if <% %> <%= %> script is used in a container that has an error and needs to add a control.
public bool UseClientScriptHtmlInjection { get; set; }