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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:41:51+00:00 2026-05-11T06:41:51+00:00

I am using nested repeaters to build a table for reasons I won’t discuss

  • 0

I am using nested repeaters to build a table for reasons I won’t discuss here, but what I’m looking to do is have two datasources, one for the top level repeater that will correspond to the rows, and one for the second level repeater that will return cells within a row.

What I’m wondering, however, is if I can somehow specify a parameter in the nested repeater’s datasource that is set a field in the results from the first datasource?

Can I set a parameter to the value of a data binding expression?

The reason I want to do this is I have two stored procedures. When the page is loaded I have a session parameter I can use to run the first stored procedure, however, for the second stored procedure, I need to associate a value from each instance of the top level repeater with a call to the second stored procedure with a different parameter value.

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T06:41:51+00:00Added an answer on May 11, 2026 at 6:41 am

    I think the best way would be to handle the ItemDataBound event of the Outer Repeater, Find the inner DataSource control and set a SelectParameter for it.

        void MyOuterRepeater_ItemDataBound(Object sender, RepeaterItemEventArgs e)      {     // Find the Inner DataSource control in this Row.     SqlDataSource s = (SqlDataSource)e.Item.FindControl('InnerDataSource');      // Set the SelectParameter for this DataSource control     // by re-evaluating the field that is to be passed.     s.SelectParameters['MyParam'].DefaultValue = DataBinder.Eval(e.Item.DataItem, 'MyFieldValueToPass').ToString();     } 

    For an example using the DataList, check out the ASP.NET quickstarts here

    P.S.: Please see Tony’s reply below for an important correction to the above presented snippet. Notably, it would be essential to check the ItemType of the current RepeaterItem. Alternatively, it’s an excellent practice to always check for nulls on every object.

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

Sidebar

Related Questions

Right now I am using this to export a repeater (with multiple nested repeaters)
How would I create a nested grouping for the table below, using LINQ? I
I have a website project that I want to build using CruiseControl.net. On one
I have a problem with animations using jQuery on nested tables. I want to
I am trying to create nested repeaters dynamically using ITemplate. This repeater is like
What are the pros and cons of using nested public C++ classes and enumerations?
It is often useful to implement algorithms using nested array operations. For example, to
I am using some nested layouts in Ruby on Rails, and in one of
I am using Spring Forms for my web application. For nested properties, the form
Using online interfaces to a version control system is a nice way to have

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.