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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:51:44+00:00 2026-05-16T17:51:44+00:00

This is my bare DataList definition :- <asp:DataList runat=server ID=dtltrial ondeletecommand=dtltrial_DeleteCommand DataKeyField=PhotoId > </asp:DataList>

  • 0

This is my bare DataList definition :-

  <asp:DataList runat="server" ID="dtltrial" 
            ondeletecommand="dtltrial_DeleteCommand" DataKeyField="PhotoId" >

       </asp:DataList>

where PhotoId is my primary key of table and so i have given it as datakeyField. However i also want AlbumId along with DataKeyField. How do i specify it in DataKeyField and later on retrieve it in ondeletecommand event of DataList?

Thanks in advance 🙂

  • 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-16T17:51:45+00:00Added an answer on May 16, 2026 at 5:51 pm

    You can specify:

    DataKeyNames="PhotoId,AlbumId"
    

    Update:

    It looks like the DataList doesn’t allow you to specify multiple keys, and then retreive them as normal. From this question, the accepted answer deals with a GridView. Unfortunately the DataList doesn’t function the same.

    You’ll likely have to create a unique identifier yourself at the datasource, or create a hybrid on a databinding event. For example, “PhotoId_AlbumId”, which would turn into “837_7826”. On the delete event, you’d then have to extract out the two IDs, separated by the underscore.

    Consider creating a new single primary key on the datasource instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this --bare project on my server named WebsiteCore and every git commit
I have this simple hook on /hooks/post-update inside a bare repository: #!/bin/sh git-update-server-info GIT_WORK_TREE=/home/user/apps/application-site/dev
This question got me thinking about bare strings. When PHP sees a string that's
This is my Makefile: start: make start-prod start-dev: @NODE_ENV=development make start-bare start-prod: @NODE_ENV=production make
At this time Textmate's official Python bundle is really bare bones, especially in comparison
I've reduced this example to the bare minimum code. I'm focusing on the 'this'
My models looks something like this (stripped down to the bare minimum for this
I have a bare-bones sample project here: http://dl.dropbox.com/u/7834263/ExpandingCells.zip In this project, a UITableView has
I would like to test the validation of submitted DTO. This is the bare
This rails project is very bare-bones, just begun, so I haven't done any weird

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.