Hi Friends,
After making the ADO.Net connection, when i am trying to fetch the s_name value based on the input from textbox using below query. I am getting object reference null error. Can anybody identify what actually is the flaw in the below code
string @searchValue = txtStudentName.Text;
string sql = "SELECT * FROM Student_Detail where s_name=@searchValue";
No record is coming in sql object.
SqlCommand cmd = new SqlCommand(sql, connection);