Solved

How to add a horizontal line to my panel dynamically

Posted on 2011-09-06
2
272 Views
Last Modified: 2012-05-12
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?
0
Comment
Question by:dyarosh
2 Comments
 
LVL 28

Accepted Solution

by:
strickdd earned 500 total points
ID: 36490020
Literal myLiteral = new Literal();
myLiteral.Text = "<hr/>"
CuttentPanel.Contrals.Add(myLiteral)
0
 

Author Closing Comment

by:dyarosh
ID: 36520100
Thanks for the solution.  I didn't realize I hadn't accepted the solution so I apologize for the delay.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question