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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:14:40+00:00 2026-05-23T01:14:40+00:00

So I am using a Repeater inside a form to display a list of

  • 0

So I am using a Repeater inside a form to display a list of questions that are retrieved from a database.
Each Question allows the end user to select Yes or No and add some additional Text like this.

<ItemTemplate>
   <asp:Panel runat="server">
   <asp:RadioButtonList RepeatDirection="Horizontal" CssClass="YesNo" ID="YesNo" runat="server">
      <asp:ListItem Value="Yes" Text="Yes" />
      <asp:ListItem Value="No" Text="No" />
   </asp:RadioButtonList>
  </asp:panel>
  <asp:Panel runat="server" CssClass="MoreInfo">
     <asp:TextBox ID="TextBox1" TextMode="MultiLine" Height="70px" Rows="10" Columns="25" Wrap="true" runat="server" CssClass="MoreInfoText"></asp:TextBox>
  </asp:Panel>
</ItemTemplate>

The repeater is databound to a datatable in the PageLoad event.
One on the fields in the datatable is the Question’s number.
So when the data is posted how can I tell which question # each answer (Yes or No and additional Text) is refering to?

If I were generating the HTML by hand instead of using a Server Control I could just make the name of the html element that will be posting data like

name=variableHoldingQuestionNumber + YesNo
name=variableHoldingQuestionNumber + AdditionalComments

But I can’t seem to use a variable when setting the Name attribute inside a Repeater Item.
Is abandoning the Server Control and writing the HTML myself my only solution.

  • 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-23T01:14:40+00:00Added an answer on May 23, 2026 at 1:14 am

    Bind the questions number to a hidden field and when the save comes back, grab that hidden field back off and take the number out of it. Then you know which question you are looking at.

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

Sidebar

Related Questions

I'm using the Repeater control on my site to display data from the database.
Using ASP.NET MVC there are situations (such as form submission) that may require a
I'm playing around with a form utilizing a repeater that I've been working on,
I have an image gallery that is created using a repeater control. The repeater
I have a list that is being fed in to my page using an
I am using ASP.NET repeater and I want to display No Row Found message
I have a Repeater Control using an XMLDataSource to produce a list of movies
hi I have a radio button list inside a repeater , the repeater is
I'm using a repeater control and I'm trying to pass a parameter as such:
Existing code is using an asp:repeater to build an HTML table. (emphasis on the

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.