Display stored procedure results to a repeater row dynamically

Unanswered Display stored procedure results to a repeater row dynamically

  • Wednesday, March 04, 2009 3:47 PM
     
     
    Hi

    my stored procedure will return results which will  be diferent all the time according to date.



    SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["dsn"].ToString());
    SqlCommand sqlComm = new SqlCommand("SS_001", sqlConn);
    sqlComm.CommandType =
    CommandType.StoredProcedure;
    sqlConn.Open();SqlDataReader dtrRep = sqlComm.ExecuteReader();

    if (dtrRep.HasRows)
    {
    repOut.DataSource = dtrRep;
    repOut.DataBind();
    }

    //CLOSE CONNECTION & READER
    sqlConn.Close();
    dtrRep.Dispose();



    Eg

    PlayerName  01/03/2009   03/03/2009  04/03/2009
    ---------------  --------------    --------------   ---------------
    Adam            90                  20                30
    Nick              10                   15               15
    Terry            0                     45                45


    How can I display this on a dotnet page.

    I was thinking a repeater but dont know how to add the results dynamically.

    • Moved by Bruce.Zhou Friday, March 06, 2009 6:05 AM off topic post (Moved from Windows Forms General to Off-Topic Posts (Do Not Post Here))
    •  

All Replies

  • Friday, March 06, 2009 6:04 AM
     
     
    Hi S_Nandra,

    This is Windows Forms General forum. You may get little help here for asp.net problems. Please ask asp.net questions in http://forums.asp.net .

    Best regards,
    Bruce Zhou
    Please mark the replies as answers if they help and unmark if they don't.