Public Withevents Changing to Protected

M

Mike Voissem

Every time I change a web user control(place a new object on it, or just
change an objects properties), all of my Public WithEvents change to
Protected WithEvents. Anyone have an idea of why this might be happening?
It's a major pain to go and change all of those objects' back to Public
Thanx,
Mike
 
T

Teemu Keiski

This probably happens when you switch between design and source view in
VS.NET?
 
M

Mike Voissem

Yes. You can actually watch the cursor blink while it's changing the text.
 
T

Teemu Keiski

As I guessed. You cannot do much about that except avoid using the Design
View (e.g disable it from VS.NET's settings)
 
G

Guest

You can debug the designer rendering code to see where this is happening.

In your project settings, set the debugger to use an outside application and
point it to the executable of visual studio = devenv.exe

Start debugging and open a webform, then make your change and you can step
throught the design time code.

Set a breakpoint on the controls constructor.
--
Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group

Future Business Model
Loan Origination Services
National City Mortgage
 
T

Teemu Keiski

In fact, interesting point but how does that help with code-behind members
being changed from public to protected? Is there some trick with that to
prevent that from happening when switching back and forth between Design And
Source View (except that one could try Control+Z right after switching the
view, which works for example with changes made to source HTML by VS.NET)

If there's a way to solve this, please share.
 
G

Guest

It shouldn't be happening. That's why I said you should debug the process.
--
Direct Email: Michael.Baltic@RemoveCharactersUpTo#NCMC.Com

Staff Consultant II
Enterprise Web Services
Cardinal Solutions Group
 
T

Teemu Keiski

OK,

I'm just wondering what you mean as we don't of course get designer
assemblies so that we'd have debug symbols for it in order to debug it
thoroughly. MS doesn't ship the debug symbols. Certainly, if it is managed
code, one could use Reflector etc.

I mean, there's no custom designer written here in this scenario which you
could debug, but one of those internal ones by VS itself to which we don't
have the debug symbols in order to jump code line-by-line. So I don't really
understand what debugging that would achieve unless you totally recreate
your own designer and bypass the problem with that which as I see, is far
from a trivial task It's not that stuff that we mrere mortals could rewrite.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top