Files
Umbraco-CMS/components/umbraco.controls/feedback.cs
Shandem f6d0d043b5 DO NOT DOWNLOAD. DOWNLOAT LATEST STABLE FROM RELEASE TAB
Created 4.1.0 branch

[TFS Changeset #55082]
2009-06-19 07:39:16 +00:00

54 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace umbraco.uicontrols {
public class Feedback : System.Web.UI.WebControls.Panel {
public Feedback() {
}
protected override void OnInit(EventArgs e) {
}
protected override void OnLoad(System.EventArgs EventArguments) {
}
private bool _hasMenu = false;
private string _StatusBarText = "";
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 style=\"" + styleString + "\" class=\"" + type.ToString() + "\"><p>");
writer.WriteLine(_text);
writer.WriteLine("</p></div>");
}
}
}
}