Hi I get this error message “the name patientid does not exist in the current context” and also, “the name formpatientid does not exist in the current context”. Why would this be occuring?
public void patientUpdate()
{
hospitalSQLEntities db = new hospitalSQLEntities();
string formpatiendid = Request.Params["patientid"];
patient mypatient = null;
try
{
mypatient = db.patients.Single(u => **patientid.Equals(formpatientid))**;
}
Does this fix the issue?
I also not use the
tryblock. It’s bad practice to just trap everything.