Files
Umbraco-CMS/components/umbraco.controls/feedback.cs
Shandem 531de44f62 Fixes: 26812 - editContent error checking
Fixes: 26813 - Document.cs optimized constructor & Save() fix
Fixes: 26814 - null tree preventing UI to be drawn

[TFS Changeset #65617]
2010-04-19 15:08:04 +00:00

55 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using ClientDependency.Core;
namespace umbraco.uicontrols {
[ClientDependency(ClientDependencyType.Css, "ui/default.css", "UmbracoClient")]
public class Feedback : System.Web.UI.WebControls.Panel
{
public Feedback() {
}
protected override void OnInit(EventArgs e) {
}
protected override void OnLoad(System.EventArgs EventArguments) {
}
public feedbacktype type { get; set; }
private string _text = string.Empty;
public string Text {
get {
return _text;
}
set { _text = value; }
}
public enum feedbacktype{
notice,
error,
success
}
protected override void Render(System.Web.UI.HtmlTextWriter writer) {
if (_text != string.Empty) {
base.CreateChildControls();
string styleString = "";
foreach (string key in this.Style.Keys) {
styleString += key + ":" + this.Style[key] + ";";
}
writer.WriteLine("<div id=\"" + this.ClientID + "\" style=\"" + styleString + "\" class=\"" + type.ToString() + "\"><p>");
writer.WriteLine(_text);
writer.WriteLine("</p></div>");
}
}
}
}