Public controls

  • Thread starter Thread starter m.a
  • Start date Start date
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
 
Hello,

   Is there any way to control how designer defines control variablesin
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.
 
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?
 
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?
 
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.
 
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.
 
Back
Top