using System;
using System.Web.UI.HtmlControls;

namespace CommunityServer.Controls
{
	/// <summary>
	/// Summary description for CallbackInputHidden.
	/// </summary>
	public class CallbackInputHidden : HtmlInputHidden
	{
		public CallbackInputHidden() : base()
	{
	}

		protected override void RenderAttributes(System.Web.UI.HtmlTextWriter writer)
		{
			// overriding without calling the parent to prevent registering data validations in ASP.NET 2.0

			writer.WriteAttribute("name", this.Name);			
			Attributes.Remove("name");

			writer.WriteAttribute("type", "hidden");
			Attributes.Remove("type");
			
			if (this.ID != null)
				writer.WriteAttribute("id", this.ClientID);

			Attributes.Render(writer);

			writer.Write(" /");
		}
	}
}
