Click here to Skip to main content
16,019,614 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
on menu click i would like to bind data returned from stored procedure to a .aspx webform(which contains some labels and I would like to bind each row of dataset/datatable returned from storedproc to a specific label in the webform).

examples or suggestions would be appreciated.

Thanks!
Posted

1 solution

This one may help U !
XML
DataTable dt = new DataTable();
StringBuilder str = new StringBuilder();
dt = _linqdataaccess.functionName(); // call stored procedure
for(int i=0;i< dt.Rows.Count;i++)
     {
         if (dt.Rows[0]["model"]ToString() != "")
         {
             str.Append("<b>Content:</b> " + dt.Rows[i]["model_no"].ToString() + "<br />");
         }
      }
      lblcontact.Text = str.ToString();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900