Sir
My name is hemanth fresher learnig microsoft asp.net.
i have a doubt
here my intention is to insert data into database using 3tier architecture and display that in a grid view in the same page.
in my frontend i have admission no,gender,student name,mobilenumber fields.
i have added the dal and write the code like
namespace Dal
{
public class clsdataaccesslayer
{
SqlConnection Con = new SqlConnection(ConfigurationManager.ConnectionStrings["Connection"].ToString());
private void Registration()
{
SqlCommand Cmd = new SqlCommand("dbo.Sp_Registration", Con);
Con.Open();
Cmd.CommandType = CommandType.StoredProcedure;
try
{
Cmd.Parameters.AddWithValue("@P1",TextBox)
// Here How to add the parameters?
}
and in my business access layer i hage written the code like
using Dal;
using System.Data;
namespace Bal
{
public class Businessaccesslayer
{
int Adno;
string Sname, Gender, Mno;
clsdataaccesslayer objdal = new clsdataaccesslayer();
public int PAdno
{
set { Adno = value; }
get { return Adno; }
}
public string PSname
{
set { Sname = value; }
get { return Sname; }
}
public string PGender
{
set { Gender = value; }
get { return Gender; }
}
public string PMno
{
set { Mno = value; }
get { return Mno; }
}
}
Please Help me out
Thanks and Regards