how to connect bind a control to database by writing a
stored procedure?
Answer Posted / shivani
SqlConnection conn = new SqlConnection(strconn);
SqlCommand comm = new
SqlCommand"[StoreProcedureName]",conn);
comm.CommandType = CommandType.StoredProcedure;
comm.Parameters.AddWithValue("@UserId", Id);
sqldataadapter da= new sqldataadapter;
Dataset ds = new dataset;
try
{
conn.open();
da.fill(ds);
conn.fill;
}
catch
{
throw(ex);
}
dlFilldatalist.datasourse = ds;
dlFilldatalist.databind();
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
how to insert fname,lname,designation values into database while click on the submit button using windows authentication mode?
How to update and insert from datagridview at run time in excel database?
Give me some tips in c#?
How we work on N tire architecture in asp.net Please give me Examle...