I need to display the results of a stored procedure in to table tag in asp.net c#. I do not know how to use reasonable control in this case. You help me with.
The data returned as shown below


Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Raja TRank #685 · 3.5K reputationPosted Dec 20, 2015, 12:56 AM EST
Try like below points
1) In ASPX page create table tag with some id.
Ex
2) You can create SP in Database.
EX:
CREATE PROCEDURE Sp_TableRes
AS
BEGIN
DECLARE @TR
SET @TR="
RETRUN @TR
END
3) Finally goto .cs file add below code like
Ex:
SqlCommand cmd=new SqlCommand("Sp_TableRes", "yourconenction");
cmd.CommandType=CommandType.StoreProcedure;
//open your conection
con.Open();
string table_Rowdata=cmd.ExecuteNonQuery();
con.Close();