473,396 Members | 2,059 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,396 software developers and data experts.

Change Control Access Modifers in ASP.NET 2.0

How can i change the access modifier of a control from protected to public if
the designer code is not visible to the developer? I tryed declaring it on
the page but it throws a compile error saying that the control has already
been declared as protected.

Nuno
Jan 27 '06 #1
2 1559
Nuno,

How about accessing it via a Public Property?

Public Property MyControl As Button
Get
Return Button1
End Get
Set (ByVal value As Button)
Button1 = value
End Set
End Property

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Nuno" <Nu**@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.com...
How can i change the access modifier of a control from protected to public
if
the designer code is not visible to the developer? I tryed declaring it on
the page but it throws a compile error saying that the control has already
been declared as protected.

Nuno

Jan 27 '06 #2
Unfortunately, that is how I've been doing it. I really liked how we had the
ability to modify the access modifiers of our web controls directly instead
of having to create a property just to make a control public. However, I do
like the automated connection between the aspx controls and codebehind
control.

Nuno Pereira

"S. Justin Gengo [MCP]" wrote:
Nuno,

How about accessing it via a Public Property?

Public Property MyControl As Button
Get
Return Button1
End Get
Set (ByVal value As Button)
Button1 = value
End Set
End Property

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Nuno" <Nu**@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.com...
How can i change the access modifier of a control from protected to public
if
the designer code is not visible to the developer? I tryed declaring it on
the page but it throws a compile error saying that the control has already
been declared as protected.

Nuno


Jan 27 '06 #3

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

Similar topics

4
by: codemonkey | last post by:
TIA! I would like to know if there is a way to dynamically change the colors of Subform items? I have already set in place Conditional Formatting so each row has an alernating color scheme, but...
5
by: Peter Verhelst | last post by:
Hello, Currently I am running an Access database on a windows WTS server, running Microsoft Windows 2000 server 5.00.2195 Service Pack 3. This database should be accessible for everybody in our...
13
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which...
2
by: Tony Meier | last post by:
I am using the WebBrowser control (Explorer.Shell.2) from within a VBA application, embedded on an MS Access form to display the contents of a local folder. By default on Windows 2000/XP the...
3
by: Bob Boffin | last post by:
I have a web project that I started to develop in VWD 2005. I now have a copy of VS.NET 2005 Professional and I want to add my solution to source control. The web project is on my own development...
11
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RowSource of a Master Report is: Me.RowSource = "TableOrQueryName"
3
by: SimonG via AccessMonster.com | last post by:
Hi, I would like to be able to compare a control's new value with its old value, whenever it is changed by a user. The control holds a numeric value, qty_Sold, when this value changes I need to...
3
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RecordSource of a Master Report is: Me.RecordSource = "TableOrQueryName"
3
by: Simon van Beek | last post by:
Dear reader, How to change the RecordSource for a subReport. For forms the syntaxes is:
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:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.