B
badger
Hi,
I have created a usercontrol with a public property as follows:
// default display type to single form.
private DisplayType selectedDisplayType =
LoginForm.DisplayType.SingleForm;
public enum DisplayType
{
SingleForm = 0,
MultiForm = 1,
}
public DisplayType SelectedDisplayType
{
get {return this.selectedDisplayType;}
set {this.selectedDisplayType = value;}
}
I would like to set the valuse of the user controls public property in
the parent ASPX page as follows:
<myUserControl:Login id="l1" runat="server" SelectedDisplayType='<%#
LoginForm.DisplayType.MultiForm %>' />
BUT it does not seem to set the setter in the public property. If I
change the ASPX code to :
<myUserControl:Login id="l1" runat="server" SelectedDisplayType="1" />
It works fine.
Any thoughts on what I am doing wrong?
TIA
I have created a usercontrol with a public property as follows:
// default display type to single form.
private DisplayType selectedDisplayType =
LoginForm.DisplayType.SingleForm;
public enum DisplayType
{
SingleForm = 0,
MultiForm = 1,
}
public DisplayType SelectedDisplayType
{
get {return this.selectedDisplayType;}
set {this.selectedDisplayType = value;}
}
I would like to set the valuse of the user controls public property in
the parent ASPX page as follows:
<myUserControl:Login id="l1" runat="server" SelectedDisplayType='<%#
LoginForm.DisplayType.MultiForm %>' />
BUT it does not seem to set the setter in the public property. If I
change the ASPX code to :
<myUserControl:Login id="l1" runat="server" SelectedDisplayType="1" />
It works fine.
Any thoughts on what I am doing wrong?
TIA