Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7507951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:35:22+00:00 2026-05-29T22:35:22+00:00

I want the below format to be done from my codebehind: <a href=> <img

  • 0

I want the below format to be done from my codebehind:

<a href="">
<img src=""/>
</a>

I have done this way but I am not able to add image to <a href>
Can anyone say me how to do that?

Here is my code:

Dim urls As New List(Of String)
                urls.Add("Downloads/" & Session("tempDir").ToString & "/" & filename)
                For Each imageURL As String In urls
                    Dim img = New System.Web.UI.WebControls.Image()
                    img.ImageUrl = imageURL
                    img.Attributes.Add("src", "Downloads/" & Session("tempDir").ToString & "/" & filename)
                    img.Attributes.Add("rel", "group2")
                    img.Width = 75
                    img.Height = 50
                    img.CssClass = "clickImage"
                    img.ImageAlign = HorizontalAlign.Left
                    Me.FinalPreview.Controls.Add(img)
                Next

I have found this:

Dim anchor As New HtmlGenericControl("a")
anchor.Attributes.Add("href", "#")

But I am not able to understand how do I add img to this If I add control the total img is not showing up.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:35:23+00:00Added an answer on May 29, 2026 at 10:35 pm

    You can do it using Literal control

    Place a literal control on the page and then add its text like this…

    Dim strb as New StringBuilder()    
    For Each imageURL As String In urls
       strb.Append("<a href='#'><img src='").Append(imageURL).Append("' /></a>");
    Next
    litImage.Text = strb.ToString()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have done this previously but in a different way. I am trying to
I want to call a number in below format using platformRequest: platformRequest(tel:*123*33584744#); But it
I have the below but want to only loop through lines in #lines which
I currently have a workable Django admin on the left mockup below but want
I want to send data to server from client(Android), below is my format http://101.34.45.45/rawData?data={userId:guest1,timestamp:2010-07-01
I have a url that returns XML coordinates in the below format. I want
Django query gives me below output format,but i want below format data=`[{'total': 1744, 'name:
I want VB.NET regular expression for below format 7966-591739 I mean user must have
I want to format the Timespan to have format like this 49 hr 34
I want to create a XML file in csharp like the below format pls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.