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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:44:41+00:00 2026-05-24T08:44:41+00:00

Basically the question is: how do i get the ImageID from a repeater so

  • 0

Basically the question is:

how do i get the ImageID from a repeater so that i can pass it with a query string on button click?

For example: i need to edit a Image Details , each image have a edit button

As shown below:( generated by repeater)

enter image description here

c# code:

var List = new List<Images>();
                foreach (DataRow dr in picture.Rows)
                {
                    DateTime DateTemp =            DateTime.Parse(dr["date"].ToString());
                    var childPhoto = new Images()
                               {
                                    DateTaken = DateTemp.ToString("MM/dd/yyyy"),
                                    PlaceTaken = dr["place"].ToString(),
                                    DetailedInfo = dr["info"].ToString(),
                                    ImageID = dr["ImageId"].ToString()
                               };
                    childList.Add(childPhoto);
                }

                ShowPhotoRepeater.DataSource = List;
                ShowPhotoRepeater.DataBind();
            }
        }
    }

    protected void btnEditChildPhoto_Click(object sender, EventArgs e)
    {

        Response.Redirect("EditPhoto.aspx?ImageID=" + ));
    }

My aspx code:

 <asp:Repeater ID="ShowProfileRepeater" runat="server">
    <ItemTemplate>
    <table> 
        <tr>
            <td width = "15%" rowspan="6"><%--<asp:Image ID="ImgPhoto" runat=server />--%> 
            <%--<asp:Image ID="childImage" ImageUrl="<%#Eval("ImgUrl")%>" runat="server" />--%>  
            <asp:Image ID="childImage" ImageUrl="~/img/missing children pictures/shearwey.jpg" CssClass="content_image" runat="server" /> 
            </td><br />
            <td width = "15%">Name:</td>
            <td width = "70%">
                <asp:Label ID="lblChildName" runat="server" Text='<%#Eval("Name")%>'></asp:Label></td>
            <td >
                <asp:Button ID="btnEditChildProfile" runat="server" Text="Edit"   />
            </td>

        </tr>
        <tr>
            <td width = "15%">Gender:</td>
            <td width = "55%">
                <asp:Label ID="lblChildGender" runat="server" Text='<%#Eval("Gender")%>'></asp:Label></td>
            <td></td>
        </tr>
        <tr>
            <td width = "10%">Date Of Birth:</td>
            <td width = "55%">
                <asp:Label ID="lblChildDOB" runat="server" Text='<%#Eval("DOB")%>'></asp:Label></td>                                  
            <td></td>
        </tr>
        <tr>
            <td width = "10%">Country:</td>
            <td width = "55%">
                <asp:Label ID="lblChildCountry" runat="server" Text='<%#Eval("Country")%>'></asp:Label></td>                                  
            <td></td>
        </tr>
        <tr>
            <td width = "10%">Missing Date:</td>
            <td width = "55%">
                <asp:Label ID="lblChildMissingDt" runat="server" Text='<%#Eval("MissingDt")%>'></asp:Label></td>                                  
            <td></td>
        </tr>
        <tr>
            <td width = "10%">Last Seen Location:</td>
            <td width = "55%">
                <asp:Label ID="lblChildLaseSeenLoc" runat="server" Text='<%#Eval("LastSeenLoc")%>'></asp:Label></td>                                  
            <td></td>
        </tr>

    </table>
    </ItemTemplate>
    </asp:Repeater> 
  • 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-24T08:44:42+00:00Added an answer on May 24, 2026 at 8:44 am
    <asp:Button ID="btnEditChildProfile" runat="server" Text="Edit" CommandArgument='<%# Eval("ImageId")%>'   />
    
    
    
    protected void btnEditChildPhoto_Click(object sender, EventArgs e)
    {
        var btn = (Button)sender;
        Response.Redirect("EditPhoto.aspx?ImageID=" + btn.CommandArgument));
    }
    

    Or

    <a href='EditPhoto.aspx?ImageID=<%# Eval("ImageId") %>' >Edit</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically the question is how to get from this: foo_id foo_name 1 A 1
My question is basically this: If I set dynamic data from one class, can
That's basically the question, is there a right way to implement operator<< ? Reading
SHORT VERSION OF QUESTION: So basically my question is: How can I set the
This is basically the same question as Click items in select box, and then
I need to get the nid alone in this query. SELECT count(nid) as total,nid
I have an aspx page that, on a button click, creates an instance of
Basically my question is: mysite.php?searchword=vinegar?page=2 In the above url is it possible to GET
The question basically says it all. I want to be able to get a
Hoping this question will get answered. Basically I am attempting to open an executable

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.