Hi guys,
I'm trying to create some we custom controls fro all the webform controls, I started with text box. I created a textbox control with the foll code. I placed it on the toolbox, then dragged it on to a webform. But the problem is it does not look like a normal textbox, it just says web custom control and I cannot see it at run time on the browser. Am I doing anything wrong ? can someone help me please.
*** text box subclassed control code in a separate project.
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace cyberlogic.basetextbox
{
public class basetextbox : TextBox
{
protected override void Render(HtmlTextWriter w)
{
this.Text = "Cyberlogic Base WEB TextBox control";
this.BorderWidth = 1;
this.BorderStyle = System.Web.UI.WebControls.BorderStyle.Solid ;
this.BorderColor = System.Drawing.Color.LightBlue;
}
}
}
Fred Besterwitch, MCP
The harder you work. The luckier you get.