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

  • Home
  • SEARCH
  • 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 7664637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:21:23+00:00 2026-05-31T14:21:23+00:00

I have an entity called PendingPartners which has a navigation property to the Residents

  • 0

I have an entity called PendingPartners which has a navigation property to the Residents entity. I’m returning information from these objects like so:

 Dim getSent = (From p In dbContext.PendingPartners _
                       Join r In dbContext.Residents _
                       On p.people_id_des Equals r.people_code_id _
                       Where p.people_id_ini = people_id _
                       Where p.semester = semester _
                       Where p.year = year _
                       Select r.person_name).Distinct
        rptrSent.DataSource = getSent
        rptrSent.DataBind()

As you can see above, the data is then bound to a repeater control the code for which looks like this:

 <asp:Repeater ID="rptrSent" runat="server">
            <ItemTemplate>
                <asp:Button ID="btnDeletePartner" runat="server"
                    Text="<%# Container.DataItem %>"  />
                <br />
            </ItemTemplate>
        </asp:Repeater>

Now, I want to make it so that when someone clicks the Delete button it actually deletes that record from the entity – just the PendingPartner portion, no need to rollup to the Resident object.

Now, to do this I think I need to:

  1. Add the ID column to the EntitySQL query, e.g. Select p.id, r.person_name.
  2. Bind the ID column to the repeater as say CommandName or CommandArgument.
  3. Change the way the binding is for the text – since the repeater now has two columns.

I know how to update the EntitySQL, but I always get confused with then getting this info. into the repeater…help?

  • 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-31T14:21:24+00:00Added an answer on May 31, 2026 at 2:21 pm

    I think your need to use the bind function in the repeater

    The Button’s Text uses “person_name” and the command argument uses the “id” and the command name would be “delete”.

    like so:

     <asp:Repeater ID="rptrSent" runat="server">
            <ItemTemplate>
                <asp:Button ID="btnDeletePartner" runat="server"
                    Text='<%# bind("person_name") %>' CommandArgument='<%# bind("id") %>' CommandName="Delete"  />
                <br />
            </ItemTemplate>
        </asp:Repeater>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a linq Entity called Enquiry, which has a property: string DateSubmitted. I'm
i have this entity called BlogArticle which has a property called public virtual ICollection<BlogComment>
I have an entity called Requests which has a navigation called StatusHistories I need
I have a db.BlobProperty property (called Icon) in my entity which contains an image
I have an entity called Medico which was created as an Entity Class from
Say I have an entity called Request that has collections of child entities like
Lets say I have an entity called User which has many Posts. My service
Let's say I have an entity called Game which has a home_school_id . I
I have an entity called Entry , which has a one-to-many relationship with an
I have an entity called Band which has a to-many relationship to a Category

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.