How to add a horizontal line to my panel dynamically

dyarosh
dyarosh used Ask the Experts™
on
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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Literal myLiteral = new Literal();
myLiteral.Text = "<hr/>"
CuttentPanel.Contrals.Add(myLiteral)

Author

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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial