Click here to Skip to main content
15,918,275 members
Home / Discussions / C#
   

C#

 
GeneralUsing Resource file for collection of strings Pin
Inpreet Singh16-Mar-04 0:32
Inpreet Singh16-Mar-04 0:32 
GeneralRe: Using Resource file for collection of strings Pin
Heath Stewart16-Mar-04 3:42
protectorHeath Stewart16-Mar-04 3:42 
GeneralRe: Using Resource file for collection of strings Pin
Inpreet Singh16-Mar-04 23:17
Inpreet Singh16-Mar-04 23:17 
GeneralRe: Using Resource file for collection of strings Pin
Heath Stewart17-Mar-04 3:26
protectorHeath Stewart17-Mar-04 3:26 
QuestionWindows Service + ASP.NET, HOW? Pin
Johnny_B15-Mar-04 23:18
Johnny_B15-Mar-04 23:18 
AnswerRe: Windows Service + ASP.NET, HOW? Pin
Heath Stewart16-Mar-04 3:35
protectorHeath Stewart16-Mar-04 3:35 
GeneralRe: Windows Service + ASP.NET, HOW? Pin
Werdna16-Mar-04 4:02
Werdna16-Mar-04 4:02 
GeneralRe: Windows Service + ASP.NET, HOW? Pin
Heath Stewart16-Mar-04 4:15
protectorHeath Stewart16-Mar-04 4:15 
GeneralRe: Windows Service + ASP.NET, HOW? Pin
Johnny_B16-Mar-04 13:11
Johnny_B16-Mar-04 13:11 
GeneralRe: Windows Service + ASP.NET, HOW? Pin
Heath Stewart17-Mar-04 4:58
protectorHeath Stewart17-Mar-04 4:58 
QuestionHow to read records of a file of dbf in c# ? Pin
Solaer15-Mar-04 23:06
Solaer15-Mar-04 23:06 
Generalmain []args parameter to run another instance Pin
hazzem elrefai15-Mar-04 22:57
hazzem elrefai15-Mar-04 22:57 
GeneralRe: main []args parameter to run another instance Pin
hazzem elrefai16-Mar-04 1:41
hazzem elrefai16-Mar-04 1:41 
GeneralDrag and Drop feature in TreeView Pin
viru15-Mar-04 21:04
viru15-Mar-04 21:04 
GeneralRe: Drag and Drop feature in TreeView Pin
Heath Stewart16-Mar-04 3:23
protectorHeath Stewart16-Mar-04 3:23 
GeneralWeb control questions Pin
Den2Fly15-Mar-04 19:55
Den2Fly15-Mar-04 19:55 
GeneralRe: Web control questions Pin
Heath Stewart16-Mar-04 3:19
protectorHeath Stewart16-Mar-04 3:19 
GeneralRe: Web control questions Pin
Den2Fly16-Mar-04 3:44
Den2Fly16-Mar-04 3:44 
GeneralRe: Web control questions Pin
Heath Stewart16-Mar-04 3:53
protectorHeath Stewart16-Mar-04 3:53 
If you don't need them, don't use them. Nothing says you have to. And if you don't want them to show up in the designer, override the properties and attribute them with BrowsableAttribute(false) and EditorBrowsableAttribute(EditorBrowsableState.Never), which is very common in many classes throughout the entire .NET FCL.

If you want to do it the hard way, the Width and Height are simple properties that store the width and height either in private fields your class can use or - more commonly - in the ViewState. The Style property is a little extra work but there are classes in the respectible ASP.NET namespaces that can help you parse and resolve these. Just read the documentation for the namespaces and browse the classes.

Seriously, though, just hide the members you don't want to support from the WebControl base class. You'll save yourself a lot of work. For example:
public class MyWebControl : WebControl
{
  // ...
  // Just don't use the Width in your code anywhere when you render.
  [Browsable(false)]
  [EditorBrowsable(EditorBrowsableState.Never)]
  public override Unit Width
  {
    get { return base.Width; }
    set { base.Width = value; }
  }
}


 

Microsoft MVP, Visual C#
My Articles
GeneralThank you so much -nt Pin
Den2Fly16-Mar-04 4:53
Den2Fly16-Mar-04 4:53 
GeneralDoubleBuffer Exception Pin
Amberite0015-Mar-04 16:40
Amberite0015-Mar-04 16:40 
GeneralRe: DoubleBuffer Exception Pin
John Fisher15-Mar-04 17:08
John Fisher15-Mar-04 17:08 
GeneralRe: DoubleBuffer Exception Pin
Amberite0015-Mar-04 17:32
Amberite0015-Mar-04 17:32 
GeneralRe: DoubleBuffer Exception Pin
John Fisher16-Mar-04 12:49
John Fisher16-Mar-04 12:49 
GeneralRe: DoubleBuffer Exception Pin
Heath Stewart16-Mar-04 3:15
protectorHeath Stewart16-Mar-04 3:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.