Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

Create a component for asp.net ..... please give me a hand,thanks

Mar 11 2003 12:35 AM
I defined a component wich c#. The component have a property that datatype is customed define class inherit "System.ComponentModel.Component". Then I make it to VS.net toolbox in a asp.net solution. I draged it in a webfrom, and make the property some values,but the property can't keep value by themsefe while finish compile. please tell me way.thanks very mach. source code: class myComponent: Component //this class is a Component I want use to webform. { ComponentProperty aaa = new ComponentProperty (); public ComponentProperty aaa { get{return aaa;} set{aaa = value;} } } class ComponentProperty : Component { string a = ""; string b = ""; public string Name { get{return a;} set{a =value;} } public string Age { get{return b;} set{b =value;} } } //In VS.net properties editor,I make "Name" and "Age" value, Ctrl+Shift+B compile, then I maked value disappear...