title: VB.NET: How to call another stored procedures based on stored procedure result and display all results?
body: <p>i have a scenario, my stored procedure (sp1) takes the input from the webpage and returns some results. For example, if sp1 returns 10 records, we have "id" column in each record and we need to pass that "id" column value to another two stored procedures(ex: sp2, sp3) and display all the results(from sp1, sp2, sp3) associated to record1at the beginning of page and record2 all details after that and so on.. </p>
  
  <p>Output on web page should look like: </p>
  
  <pre><code>Record1 details 
  
  Sp2 Output(record1)
  
  sp3 Output(record1)
  
  Record2 details 
  
  Sp2 Output(record2)
  
  sp3 Output(record2)
  Record3 details 
  
  Sp2 Output(record3)
  
  sp3 Output(record3)
  </code></pre>
  
  <p>...........</p>
  
  <p>Can some one please let me know how to present in this way. Sp1 results are in an arraylist (in code behind) and sp2 and sp3 literally return tables( around 10 recrds with 5-6 columns).</p>
  
  <p>I just need how to display data.. i'm using for each to execute sp2 and sp3 for each record in the results of sp1. Looking to know how to store the data in code behind and how to display  on aspx.page.. </p>