programmatically change borderstyle on control

Discussion in 'ASP.NET / ASP.NET Core' started by KPayne, Jan 18, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Carl,

    You can use s.BorderStyle.ToString() instead of s.ID.BorderStyle.Solid to display the value of the BorderStyle property.

    Try this code:
     
  2. I want to apply a server style to all controls on a page. Instead of applying the style to each one individually - txtTextBox1.borderstyle = "solid"
    I want to loop thru the controls and apply the style.
    I tried this and s.id is just a string. What do I do to access the controls properties?
    Sub DisplayControls( s As Object )
    Dim ctlControl As Control

    For Each ctlControl in s.Controls
    DisplayControlInfo( ctlControl )
    strControlList &= "<ul>"
    DisplayControls( ctlControl )
    strControlList &= "</ul>"
    Next
    End Sub

    Sub DisplayControlInfo( s As Object )
    s.ID.BorderStyle.Solid
    End Sub

    Thanks for your help! Carl
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page