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 8583691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:35:54+00:00 2026-06-11T21:35:54+00:00

My list view ItemTemplate is as follows <a href='<%# getpath(Eval(IMAGE_PATH)) %>’ title='<%# Eval(IMAGE_DESCRIPTION) %>’>

  • 0

My list view ItemTemplate is as follows

<a href='<%# getpath(Eval("IMAGE_PATH")) %>' title='<%# Eval("IMAGE_DESCRIPTION") %>'>
   <asp:Image ID="capty" CssClass="capty" runat="server" 
       AlternateText='<%# Eval("IMAGE_DESCRIPTION") %>' 
       ImageUrl='<%# retriveurl(Eval("IMAGE_PATH")) %>' 
       Height="100px" Width="150px">
   </asp:Image>
</a>

my codebehind source is

int count=ListView1.Items.Count;
    List<ImageGallery> _list = new List<ImageGallery>();
    for (int i = 0; i < count; i++)
    {
        ImageGallery ob = new ImageGallery();
        ob.ImageName = ??
        ob.Description = ??
        _list.Add(ob);
    }

now i want to insert the Eval(“IMAGE_DESCRIPTION”) data to a ob.Description and ob.ImageName=Eval(“IMAGE_ID”) .How to do this?

List<ImageGallery> _list = new List<ImageGallery>(); 
for (int i = 0; i < ListView1.Items.Count; i++) 
{ 
    ImageGallery ob = new ImageGallery(); 
    ob.ImageName = ""; 
    ob.Description = " "; 
    _list.Add(ob); 
}
  • 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-06-11T21:35:55+00:00Added an answer on June 11, 2026 at 9:35 pm

    You can use FindControl to get the image. You pass it the ID of the control you want to find (“capty”); it returns an object, so you need to cast/unbox it to the control type Image. See below:

    List<ImageGallery> _list = new List<ImageGallery>(); 
    for (int i = 0; i < ListView1.Items.Count; i++) 
    {
        Image image = (Image)ListView1.Items[i].FindControl("capty");
        ImageGallery ob = new ImageGallery(); 
        ob.ImageName = ""; 
        ob.Description = image.AlternateText; 
        _list.Add(ob); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list view like below: <asp:ListView ID=lstTopRanks runat=server> <ItemTemplate> <div class=Amazing-{recordNumber}>{itemdata}</div> </ItemTemplate>
I have a list view with a HyperLink control within the ItemTemplate. I want
I have the following structure <asp:UpdatePanel ID=MyUpdatePanel runat=server> <ContentTemplate> <asp:MultiView ID=MyViews runat=server> <asp:View ID=List
<ItemTemplate> <%# ShowDescription((ClassName) Eval(this)) %> </ItemTemplate> I bind a list of objects to my
I have a list view that does something like this in the ItemTemplate: <div><%#
hi I am using a list view for showing selection marks. <asp:listview id=lvanswerlist runat=server>
I have a setup, something confusing like this: <ListView> <ItemTemplate> <div id=Content> <asp: TextBox
Sample code <asp:Repeater> <ItemTemplate> <asp:ListView DataSource=<%# Container.DataItem.Items %> ... /> <asp:DataPager .... /> </ItemTemplate>
My list view is parsed from a online resource, but i cant get the
I have a list view binded to a data source. How can I enable

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.