Create a custom label that implements IPostBackDataHandler
问题 I want to create a label that implements the IPostBackDataHandler, because I want to change the text with javascript. If I trigger a postback after that, than my text is gone. The code that I already have is this: public class CustomLabel : Label, IPostBackDataHandler { protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (Page != null) Page.RegisterRequiresPostBack(this); } public bool LoadPostData(string postDataKey, System.Collections.Specialized.NameValueCollection