KPayne
01-18-2004, 02:16 AM
Carl,
You can use s.BorderStyle.ToString() instead of s.ID.BorderStyle.Solid to display the value of the BorderStyle property.
Try this code:
[quote]
SubDisplayControls(ByValsAsObject)
DimctlControlAsWebControl
DimProps()AsSystem.Reflection.PropertyInfo=ctlCont rol.GetType.GetProperties_
(Reflection.BindingFlags.InstanceOrReflection.Bind ingFlags.Public)
DimtempPropAsSystem.Reflection.PropertyInfo
DimHasBorderStylePropertyAsBoolean
ForEachtempPropInProps
IftempProp.Name="BorderStyle"Then
HasBorderStyleProperty=True
ExitFor
EndIf
Next
IfHasBorderStylePropertyThen
ForEachctlControlIns.Controls
DisplayControlInfo(ctlControl)
DisplayControls(ctlControl)
ctlControl.BorderStyle=BorderStyle.Solid
DisplayControls(ctlControl)
Next
EndIf
EndSub
SubDisplayControlInfo(ByValsAsObject)
Response.Write(CType(s,WebControl).ID&" "&_
CType(s,TextBox).BorderStyle.ToString())
EndSub
</CODE>
Keith Payne
Technical Marketing Solutions
You can use s.BorderStyle.ToString() instead of s.ID.BorderStyle.Solid to display the value of the BorderStyle property.
Try this code:
[quote]
SubDisplayControls(ByValsAsObject)
DimctlControlAsWebControl
DimProps()AsSystem.Reflection.PropertyInfo=ctlCont rol.GetType.GetProperties_
(Reflection.BindingFlags.InstanceOrReflection.Bind ingFlags.Public)
DimtempPropAsSystem.Reflection.PropertyInfo
DimHasBorderStylePropertyAsBoolean
ForEachtempPropInProps
IftempProp.Name="BorderStyle"Then
HasBorderStyleProperty=True
ExitFor
EndIf
Next
IfHasBorderStylePropertyThen
ForEachctlControlIns.Controls
DisplayControlInfo(ctlControl)
DisplayControls(ctlControl)
ctlControl.BorderStyle=BorderStyle.Solid
DisplayControls(ctlControl)
Next
EndIf
EndSub
SubDisplayControlInfo(ByValsAsObject)
Response.Write(CType(s,WebControl).ID&" "&_
CType(s,TextBox).BorderStyle.ToString())
EndSub
</CODE>
Keith Payne
Technical Marketing Solutions