Bineesh  Viswanath

Bineesh Viswanath

  • NA
  • 1k
  • 775.4k

Direct and Indirect Data Retrieve from Database in ASP.NET

Aug 22 2013 11:51 AM
Sir, I am always confused of Direct and Indirect Data Retrieve from Database in ASP.NET.

Here I showing It with an example:-

1) Indirect Retrieve:-

protected void btnSave_Click(object sender, EventArgs e)
{
            classInfo infoclass = new classInfo();
            classSP spClass = new classSP();
            infoclass.className = txtClassName.Text;
            infoclass.noOfseats = int.Parse(txtnoOfSeats.Text);
          
            spClass.classAdd(infoclass);
}

2)Direct Retrieve:-

 In this please send me the reply to the lines I double-slashed.

protected void btnSave_Click(object sender, EventArgs e)
{
// Avoid classinfo and classSP

// set the controls to the adding value

/* what happen when set command like:- SqlCommand cmd=new SqlCommand("Insert into tbl_Class(className,noOfseats) values(@className,@noOfseats)",sqlCon);*/

}


Answers (2)