Advertisement

04.24.2008 at 11:45AM PDT, ID: 23351436
[x]
Attachment Details

how do you hide public methods?

Asked by nisarkhan in Programming for ASP.NET

i have bunch of classes that would like to hide when the user start using my custom server control and what i have noticed that i can see all my classes>>methods in .aspx page which i dont think i should be exposing those classes/methods.

how would you hide?

i try to do PROTECTED but i get error

any suggestions pelase?

thanks.
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
here is how i'm using:
i have 3 classes and classes have methods/properties
 
1) SuggustControl
2) SuggestItem
3) ColumnCollection
 
my SuggestControl is calling #2 and #3
 
here is my all  classes looks like:
 
 public class AutoSuggestMenuItem
 {
        public AutoSuggestMenuItem(string label, string value, string displaylabel) : this()
        {
            _label = label;
            _value = value;
            _displaylabel = displaylabel; 
        }
 
        public string GetJSON()
        {
            XJsonWriter writer = new XJsonWriter();
            writer.WriteNameValue("label", _label);
            writer.WriteNameValue("displaylabel", _displaylabel);
            writer.WriteNameValue("value", _value);
            writer.WriteNameValue("isSelectable", _isSelectable);
            writer.WriteNameValue("cssClass", _cssClass, true);
            return writer.ToString();
        }
 }
 
 [Serializable]
    public class ColumnsCollection
    {
         
        public ColumnsCollection() { }
 
        public ColumnsCollection(string HeaderText, Column.Align HeaderAlignment, Column.Align ItemAlignment, Unit Width, string DataField, Column.MatchType Match, bool isAutoSuggest, bool isVisible) 
        {
            this._HeaderText = HeaderText;
            this._HeaderAlignment = HeaderAlignment;
            this._ItemAlignment = ItemAlignment;  
            this._Width = Width;
            this._DataField = DataField;
            this._Match= Match;
            this._isAutoSuggest = isAutoSuggest;
            this._isVisible = isVisible;
        }
    }
 
 
i add the server control to my .aspx page and in my .aspx page
 
<%@ Register Assembly="MySuggest" Namespace="MySuggest" TagPrefix="cc1" %> 
<cc1: {i see all the classes (AutoSuggestMenuItem....ColumnsCollection }
 
 
i dont want to display the #2 and #3 classes in my .aspx page
 
i hope i explain clear enough.
[+][-]04.24.2008 at 12:04PM PDT, ID: 21434068

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 09:13PM PDT, ID: 21437017

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 08:12AM PDT, ID: 21440327

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 08:13AM PDT, ID: 21440342

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 08:25AM PDT, ID: 21440492

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 08:28AM PDT, ID: 21440523

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 08:48AM PDT, ID: 21440720

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 05:13PM PDT, ID: 21443969

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 06:50PM PDT, ID: 21444193

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.26.2008 at 08:06AM PDT, ID: 21445751

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.26.2008 at 01:55PM PDT, ID: 21446812

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 07:48PM PDT, ID: 21484288

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Programming for ASP.NET
Sign Up Now!
Solution Provided By: khan2000
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906