Link to home
Start Free TrialLog in
Avatar of dyarosh
dyarosh

asked on

How to add a horizontal line to my panel dynamically

I am adding pictures dynamically to a panel on my ASP.NET page using the following code in my Page Load Event:

        For Each img In nodeList
            Dim imgTemp As New Image
            imgTemp.ID = "CurImage" & cnt.ToString
            imgTemp.CssClass = "borders_off"
            imgTemp.ImageUrl = img.InnerText
            imgTemp.Attributes("onclick") = "SetClass(this);"
            CurrentPanel.Controls.Add(imgTemp)
            cnt = cnt + 1
        Next

How can I add a <hr /> between the pictures in the Panel?  I tried CurrentPanel.Controls("<hr />") but I got a compile error.  Any thoughts?
ASKER CERTIFIED SOLUTION
Avatar of strickdd
strickdd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dyarosh
dyarosh

ASKER

Thanks for the solution.  I didn't realize I hadn't accepted the solution so I apologize for the delay.