473,466 Members | 1,381 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Public Withevents Changing to Protected

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
Nov 19 '05 #1
7 1384
This probably happens when you switch between design and source view in
VS.NET?

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
Nov 19 '05 #2
Yes. You can actually watch the cursor blink while it's changing the text.

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:eb**************@TK2MSFTNGP10.phx.gbl...
This probably happens when you switch between design and source view in
VS.NET?

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

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

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
Nov 19 '05 #4
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
"Teemu Keiski" wrote:
As I guessed. You cannot do much about that except avoid using the Design
View (e.g disable it from VS.NET's settings)

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

Nov 19 '05 #5
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.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

Nov 19 '05 #6
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
"Teemu Keiski" wrote:
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.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

Nov 19 '05 #7
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.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke



Nov 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Adam H. Peterson | last post by:
I just made an observation and I wondered if it's generally known (or if I'm missing something). My observation is that static protected members are essentially useless, only a hint to the user. ...
175
by: Ken Brady | last post by:
I'm on a team building some class libraries to be used by many other projects. Some members of our team insist that "All public methods should be virtual" just in case "anything needs to be...
2
by: Andreas Klemt | last post by:
Hello, what is the difference between a) Protected WithEvents myClassName b) Protected myClassName Thanks, Andreas
2
by: Benign Vanilla | last post by:
I am a ASP.NET newbie so please bear with me. I had a series of webforms working on my web site, and then I made some tragic error that is causing all kinds of problems. The main symptom is that...
3
by: Mat | last post by:
Hi, I am trying to create a set of global functions that are available to any page. However I am not really getting anywhere, even after looking at several examples. This is the code I have...
4
by: Brian Lowe | last post by:
I have several aspx pages that include a couple of asp:placeholder controls, an example is myPage.aspx. The page inherits from a custom class 'myClass' which inherits System.Web.UI.Page which...
4
by: Shapper | last post by:
Hello, I have an aspx.vb page with this code: Public Class WebForm1 Inherits System.Web.UI.Page Protected WithEvents Menu1 As MenuControl.Web.UI.Menu ... If I have my code in the aspx...
4
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once...
1
by: Will Gillen | last post by:
I know this has probably been asked before, but I can't seem to find a solid answer in any of the archives. First, before my question, please forgive my limited knowledge of the event lifecycle...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.