Hai all i tried something like this
[HttpPost]
public ActionResult editpersonaldetails(tb_userpersonaldata obj)
{
DataTable dt = new DataTable();
Guid userid = (Guid)Session["userid"];
string s = "select * from tb_userpersonaldata where userid='" + userid + "'";
SqlConnection con = new SqlConnection();
SqlCommand cmd = new SqlCommand(s, con);
con.Open();
SqlDataReader dr;
dr = new SqlDataReader();
dt.Load(dr);
dr.Close();
con.Close();
can any one
return View();
}
bbut it says The type 'System.Data.SqlClient.SqlDataReader' has no constructor ..i m not able to find the bug...can any suggestions??
TIA
Rajeesh MenothPosted Apr 25, 2016, 6:38 AM
ali tuncerPosted Apr 25, 2016, 4:35 AM
try this way :
SqlDataReader dr= cmd .ExecuteReader();