Ask a Question related to ASP.NET Building Controls, Design and Development.
-
marcin.kozlowski@internetium.pl #1
list of other controls in properties during design
Hi,
Basicaly what I'm doing, is making a TabPage control which is
"attached" to a MultiView control in order to have tab pages on my
webpage. That control has a property "MultiViewToControl" which is the
ID of the MultiView it should work with. Now I want this property to
behave like e.g. validator's "ControlToValidate", i.e. to have a
drop-down list of all controls on the webpage. I've read tons of topics
about this, but just can't get it to work in ASP.Net. In windows forms
(which I'm more familiar with than ASP.NET), using my own TypeConverter
and the TypeConverterAttribute works perfectly:
public class TestTypeConverter : TypeConverter
{
public override bool
GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
public override bool
GetStandardValuesExclusive(ITypeDescriptorContext context)
{
return true;
}
public override StandardValuesCollection
GetStandardValues(ITypeDescriptorContext context)
{
ArrayList temp = new ArrayList();
if (context == null)
return null;
if (context.Container == null)
return null;
foreach (Control c in context.Container.Components)
{
temp.Add(c.Name);
}
return new StandardValuesCollection(temp);
}
}
but when I try to do that in ASP, the context sent to GetStandardValues
is always null (could be seen by replacing the first "return null;"
with something more meaningful). Could anyone help me (whole code of a
simple class would be appreciated, as I've read some examples already
and never got them to work - maybe I'm doing sth stupid).
Oh and please forgive my English, I know it's far from perfect.
Regards
Marcin
marcin.kozlowski@internetium.pl Guest
-
Why the properties of web user controls which inherted from my custom base UI controls MISSED?
Why the properties of web user controls which inherted from my custom base UI controls MISSED? How should I to set enable? -
Changes in controls exposed as properties not reflected in design
I created a custom composite control with contains a text box and a label. I exposed the text box and label as properties of the custom control. As... -
need form controls list at design time
Hello, I have created a server control and would like to have one of my properties have a drop down list with the controls on the current page as... -
properties not showing in properties window at design time
I created a usercontrol using vb but the properties will not show in the properties pane however the properties show up in the intellisence list.... -
Accessing Properties of Custom Controls child Controls
I am using a Custom Control on a page which renders a button control if required. I need to access the child button control's properties (i.e....



Reply With Quote

