Solved

How to add a horizontal line to my panel dynamically

Posted on 2011-09-06
2
269 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
Comment Utility
Literal myLiteral = new Literal();
myLiteral.Text = "<hr/>"
CuttentPanel.Contrals.Add(myLiteral)
0
 

Author Closing Comment

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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now