Your question, your audience. Choose who sees your identity—and your question—with question security.
public partial class MyUserControl : System.Web.UI.UserControl
{
protected override void RenderControl(HtmlTextWriter writer)
{
if (this.DesignMode)
{
writer.Write("Hello World!!! - Design Time");
}
else
{
writer.Write("Hello World!!! - Run Time");
}
}
}
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
What are you doing with declarative HTML markup that you can't do with a custom web control?