D
Dave
If I have a user control that I want to initialize with a parameter;
that cannot be changed during the lifecyle of the control; like what you
can normally easily accomplish with class constructors.
I'm dynamically adding the control to the page, so
1 Control myControl = LoadControl(theControl.aspx);
2 //this line blank =)
3 Placeholder.Controlsl.Add(mycontrol);
I can easily set a property of the control at line 2 with a
mycontrol.propertyname=X and that works. But there is nothing stopping
me from changing the that property over and over again and that isn't
the behaviour I want to allow.
Is that the only way?? Or am I missing something??
Thanks,
Dave
that cannot be changed during the lifecyle of the control; like what you
can normally easily accomplish with class constructors.
I'm dynamically adding the control to the page, so
1 Control myControl = LoadControl(theControl.aspx);
2 //this line blank =)
3 Placeholder.Controlsl.Add(mycontrol);
I can easily set a property of the control at line 2 with a
mycontrol.propertyname=X and that works. But there is nothing stopping
me from changing the that property over and over again and that isn't
the behaviour I want to allow.
Is that the only way?? Or am I missing something??
Thanks,
Dave