Yeah, Eric ... that's annoying. The IDE does not do that with WinForms (and in fact, the default is private rather than protected), so it's curious that it does it with WebForms. But, anyway, the way to solve your problem is to let the IDE have it's way, and for the members that you want to be public, make a property for them.
protected TextBox m_MyTextBox;
public TextBox MyTextBox
{
get {return this.m_MyTextBox;}
set {this.m_MyTextBox = value;}
}
This is the preferred way of exposing public properties anyway, although to be honest I don't always do it when I'm feeling lazy. <g>
~~Bonnie
>Does anyone know how to prevent this incredibly irritating thing .net does when it arbitrarily sets members of a web form to Protected when I specifically set them to public? Any time I edit a webform and add a control or modify a property of a control it resets all the controls to Protected which causes the compiler to blowup.
>
>When I set a member to Public I do it for a reason and I expect it to stay that way until I say otherwise. I am constantly having to reset members to public access. I don't want the IDE deciding for me what access settings I need in my code!