Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclass textbox
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Titre:
Subclass textbox
Divers
Thread ID:
00807291
Message ID:
00807291
Vues:
62
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform