Link to home
Start Free TrialLog in
Avatar of TrialUser
TrialUserFlag for Afghanistan

asked on

adding li to the ul from server side code

I am trying to add li to ul from code behind.  Following is the html I have currently. I need to move this to vb.net

 <ul id="mycarousel" runat ="server"  class="jcarousel-skin-tango">       
        <li><a href = "/rebate/b0" ><img src="/Assets/Rebate/PaperClipsEtc100.jpg" style="background-color:#E7E7E9;padding:4px;border:1px solid #D6D7D9;" /></a></li>            
    </ul>      
I started of with this , but I dont see the image. Please help

     For countRebate As Integer = 0 To dtRebates.Rows.Count - 1
                Dim liCarousel As New HTMLGENriccontrol
                mycarousel.Controls.Add(liCarousel)

                Dim anchorCarousel As New HtmlAnchor
                anchorCarousel.Attributes.Add("href", "/rebate/b" & dtRebates.Rows(countRebate)("BrandID"))
                liCarousel.Controls.Add(anchorCarousel)

                Dim imgCarousel As New HtmlImage
                imgCarousel.Attributes.Add("src", "/Assets/images/products/mfglogos/3M_LOGO.jpg")
                anchorCarousel.Controls.Add(imgCarousel)
            Next
SOLUTION
Avatar of kaufmed
kaufmed
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
Have you seen the source that's rendered in browser? Can you show the relevant parts here?
ASKER CERTIFIED SOLUTION
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
SOLUTION
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