Public controls

M

m.a

Hello,

Is there any way to control how designer defines control variables in
designers.cs file?



By default, all controls, which are created by designer, are protected, but
I want some of them to be public. I know that I can move them to code behind
file, but I am wondering if there is any way to ask designer to define them
as public.



Regards
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello,

   Is there any way to control how designer defines control variables in
designers.cs file?

By default, all controls, which are created by designer, are protected, but
I want some of them to be public. I know that I can move them to code behind
file, but I am wondering if there is any way to ask designer to define them
as public.

Regards

If you want some of them to be accessible outside the class create a
property that wrap them.
 
M

m.a

message
Hello,

Is there any way to control how designer defines control variables in
designers.cs file?

By default, all controls, which are created by designer, are protected,
but
I want some of them to be public. I know that I can move them to code
behind
file, but I am wondering if there is any way to ask designer to define
them
as public.

Regards

If you want some of them to be accessible outside the class create a
property that wrap them.

Thank you for your reply. What I want is that when designer creating a
member variable , it create it as public instead of protected. Is there any
way to do this?
 
M

m.a

Thanks,

I select the conyrol in aspx page and then I looked at the property page,
but I can not find any design entery ! where is it?
 
G

gerry

sorry - I just noticed that you are also posting this to the asp.net group -
I assumed you were talking about windows forms
You are correct - afaik in asp.net form designer there is no way to set a
control's modifier.
 
J

Jeff Johnson

I select the conyrol in aspx page and then I looked at the property page,
but I can not find any design entery ! where is it?

For future reference, if you're going to crosspost to a general group like
C#, PLEASE explicitly state that you're talking about Web controls. Many
people do not look at the group list and we tend to assume Windows Forms
unless stated otherwise.
 

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,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top