using System;

namespace inheritanceproject
{
	/// <summary>
	/// Summary description for NewButton.
	/// </summary>
	public class NewButton : System.Web.UI.WebControls.WebControl
	{
		string _control;

		public NewButton() : base(System.Web.UI.HtmlTextWriterTag.Button)
		{
		}
		
		public string Control
		{
			get
			{
				return _control;
			}
			set
			{
				_control = value;
			}
		}

		protected override void
			AddAttributesToRender(
			System.Web.UI.HtmlTextWriter
			writer)
		{
			base.AddAttributesToRender(writer);
			writer.AddAttribute("onclick",
				"fnOpen('" + _control + "');");
		}

		protected override void
			RenderContents(
			System.Web.UI.HtmlTextWriter
			writer)
		{
			writer.Write("Nowy");
			base.RenderContents(writer);
		}
	}
}
