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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:18:24+00:00 2026-05-24T10:18:24+00:00

I’m getting really frustrated as I’m trying to get an array to my _Click-Event

  • 0

I’m getting really frustrated as I’m trying to get an array to my _Click-Event in my ASP.NET-Application.

Here’s the thing:
I have an dynamicly created “form”, which is a todolist.
So for every todo, I have an description (from the database), a note-field and a checkbox.

Since their could be 0-n todos, I can’t work with the asp:-Tag in the ascx-File.

That’s why I created an class for each todo, which looks like this:

private class todoContainer 
    { 
        public int? id 
        { 
            get; 
            set; 
        } 

        public CheckBox activeted 
        { 
            get; 
            set; 
        }
[...]

The list gets created with an foreach-loop and every toDo goes into the array “todoArray”.
Here’s how I work with the Controls inide the loop:
checkboxArea.Controls.Add(todoArray[todoArrayInt].activeted);

Since I now want to send the list to the submit-event with all the changes I made (for examples if I want to add a note to toDo X and want to cross off toDo Y), I have to get the whole array in my _Click-method.
Unfortunately I can’t find a way to accomplish this…

I tried this:

  • Get the whole array into an asp:HiddenField-Controll, which doesn’t work at all
  • Get the array into a session, but than I can’t find a way how to track changes…

If anybody could help me, I would be realy thankfull.

Best regards
Richard

  • 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-24T10:18:25+00:00Added an answer on May 24, 2026 at 10:18 am

    how about using a asp:repeater control?

    on your submit button click event you should be able to loop through every item in your asp:repeater

    foreach(RepeaterItem item in repeater1.Items)
    {

                 TextBox box = (TextBox)item.FindControl("Value");
                 string b = box.Text;               
    
               }
    

    //do stuff here after looping through repeater

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.