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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:31:22+00:00 2026-05-22T17:31:22+00:00

I am generating buttons programmatically. They are the answers to a question. A question

  • 0

I am generating buttons programmatically. They are the answers to a question. A question can have 2..* answers. when a user clicks on an answer his action is recorded in a database.
Now, In order to know on which button a user clicked, I decided to create a datagrid with only a CommandField Select column. this will allow me to determine which row was selected in the codebehind.

Problem: Can I bind the text of the CommandField Select? I want the text to be the answer not just the text “Select” on each row.

Do you suggest another solution to my problem?

I need something like
how old are you?

0-18 //answer1 (Command Field)

18-21

greater than 21

  • 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-22T17:31:23+00:00Added an answer on May 22, 2026 at 5:31 pm

    I think most people would use the RadioButtonList or CheckboxList for that sort of thing. If you follow the links, you will find examples of both. I would probably go that route instead of a DataGrid. That’s typically for displaying tabular data for viewing/editing purposes. That’s just my 2 cents, though.

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

Sidebar

Related Questions

I'm generating table rows N times. If the user clicks add row buttons, I'm
I am programatically generating mouse clicks when a user clicks a certain keyboard key
I am generating multiple buttons using PHP: <form name=submit_form id=submit_form action=> <?php for ($i
I have an MVC application generating a series of radio buttons based on a
I'm generating buttons dynamically that I want it to call a method like this:
I have ASP.Net code generating my button's HTML for me using divs to get
Im generating a file to present to the user for download, but the server
I'm generating ICalendar (.ics) files. Using the UID and SEQUENCE fields I can update
I'm dynamically generating radio buttons in my code behind and assigning javascript to them
I have an issue where Internet Explorer is generating an additional br element that

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.