Hi All,
I have a requirement to create a custon button control, which should be rendered with <button> tag.
I need all the properties and events of normal asp.net button control.
I tried the following code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace CustomControls
{
[DefaultProperty("Text")]
[ToolboxData("<{0}:CustomButton runat=server></{0}:CustomButton>")]
public class CustomButton : Button
{
protected override HtmlTextWriterTag TagKey
{
get
{
return HtmlTextWriterTag.Button;
}
}
protected override void Render(HtmlTextWriter w)
{
base.Render(w);
}
protected override void RenderContents(HtmlTextWrit ...
Go to the complete details ...