473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Web Form Designer Generated Code - Get Me Outta Here!! :-)

Hey guys,

how do I make a control PUBLIC inside the Web Form Designer Generated Code?

What happens is that I make it public, i Run the solution, it works
perfectly fine. Then for some reason unknown to me, VS.Net flips it back
from public to protected (This:

Public WithEvents dcpMain As
DBauer.Web.UI.WebControls.DynamicControlsPlacehold er

To

Protected WithEvents dcpMain As
DBauer.Web.UI.WebControls.DynamicControlsPlacehold er

When it feels like it.

So how can I do this? :-/

Thanks!


Nov 17 '05 #1
1 1432
"Leeor Geva" <le***@chcrx.com> wrote in message
news:OO**************@TK2MSFTNGP09.phx.gbl...
Hey guys,

how do I make a control PUBLIC inside the Web Form Designer Generated Code?
What happens is that I make it public, i Run the solution, it works
perfectly fine. Then for some reason unknown to me, VS.Net flips it back
from public to protected (This:

Public WithEvents dcpMain As
DBauer.Web.UI.WebControls.DynamicControlsPlacehold er

To

Protected WithEvents dcpMain As
DBauer.Web.UI.WebControls.DynamicControlsPlacehold er


If the designer put the "Protected" definition there to begin with, then why
wouldn't the designer do the same thing again, given the same input data?

Besides, don't expose public fields. Expose a public property which returns
the protected or private field.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #2

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

Similar topics

7
by: Studio P.M. | last post by:
Dear colleagues, Does anyone have an idea where I could find precise and detailed explanation of each and every statement of the following “Web Form Designer generated code”: #region Web...
1
by: JakeC | last post by:
when i put my code in initializecomponent it gets erased. where is the best place to put my page oninit code a)oninit b)initializecomponent when i put in #region Web Form Designer...
2
by: MadMikey | last post by:
Can I change the order that controls are defined, or built, in the "Windows Form Designer generated code" section? I'm using VB.NET 2003. I have a custom control, that due to licensing...
1
by: Melson | last post by:
Hi I've realised that whenever I declare this sentence, "dim newform as new mainform" in another form, the Public Sub New() in Windows Form Designer generated code in mainform will automatically...
1
by: QLD_AU | last post by:
I am having trouble when viewing the code behind a form, any events i do are shown, however the Windows Form Designer generated code Section is not shown, Does anyone know how to turn this on...
3
by: pmclinn | last post by:
In version 2003 of visual studio you could see the vs form code. In vs2005 I do not see it. How do I fix this issue?
6
by: Nathan Sokalski | last post by:
I recently converted some ASP.NET 1.1 projects of mine, created with Visual Studio .NET 2003, to Web Application Projects in Visual Studio .NET 2005 so that I could use ASP.NET 2.0 (All my ASP.NET...
13
by: cj | last post by:
In a project done in 2003 about a year ago I was told to add the SocketWrench code below into the Windows Form Designer generated code area as shown below. #Region " Windows Form Designer...
1
by: JJ | last post by:
i convernted my asp.net 1.1 application to 2.0 web project application. I noticed that the "Web form designer generated code" is still part of the page. Is it safe to remove those section? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.