Solved

How to add a horizontal line to my panel dynamically

Posted on 2011-09-06
2
271 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
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 …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

17 Experts available now in Live!

Get 1:1 Help Now