Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controls inheriting
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00963668
Message ID:
00963685
Vues:
7
I did it!, I found the way! Thanks
>Thanks for your answear Bonnie, I did it but now I cann't find my class in "Add/Remove items" Where is it?
>
>>Rodolfo,
>>
>>Basically, you'll want a class library that contains your sub-classed UI controls, like textbox, button, etc. Something like this:
>>
>>using System;
>>using System.Data;
>>using System.Web;
>>using System.Web.UI.WebControls;
>>using System.Web.UI.HtmlControls;
>>
>>namespace MyCompany.WebUI.MyClasses
>>{
>>	public class MyLabel: System.Web.UI.WebControls.Label
>>	{
>>		private string m_MyProperty;
>>
>>		// properties
>>		public string MyProperty
>>		{
>>		   get {return this.m_MyProperty;}
>>		   set {this.m_MyProperty = value;}
>>		}
>>
>>	}
>>
>>	public class MyTextBox : System.Web.UI.WebControls.TextBox
>>	{
>>		// code here
>>	}
>>
>>	public class MyButton : System.Web.UI.WebControls.Button
>>	{
>>		// code here
>>	}
>>}
>>
>>
>>Add these to the ToolBox by right-clicking on the ToolBox and choosing Add/Remove Items.
>>
>>~~Bonnie
>>
>>
>>
>>>How could I create a class based on the system basic class "label", then drag and drop it on a web form, and finally be able to modify its methods and properties through the properties panel as I am used to doing with VFP.
Rodolfo Martín Villanueva
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform