I have written the stored procedure like this-----------
ALTER PROCEDURE dbo.Sp_clientinsert
(
@clint varchar(5),
@clinm varchar(20),
@cont1 varchar(10),
@cont2 varchar(10),
@pradd varchar(MAX),
@lcadd varchar(MAX),
@email varchar(50),
@ccity varchar(20),
@thsil varchar(20),
@distr varchar(20),
@state varchar(20),
@con varchar(20),
@pin numeric(10),
@conpr varchar(50),
@branm varchar(20),
@cladd date ,
@clldt date,
@clilt time
)
AS
insert into CLNT values
(@clint,@clinm, @cont1, @cont2,@pradd,@lcadd,@email,@ccity,@thsil,@distr,@state,@con,@pin,@conpr,@branm ,@cladd,@clldt,@clilt)
RETURN
My .cs file contains following code
public int ClientDetails()
{
SqlCommand command = new SqlCommand("Sp_clientinsert", connectionmanager.GetConnection());
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(new SqlParameter("@clint", Client));
command.Parameters.Add (new SqlParameter("@clinm",ClientName ));
command.Parameters.Add(new SqlParameter("@cont1",Contact1));
command.Parameters.Add(new SqlParameter("@cont2 ",Contact2 ));
command.Parameters.Add(new SqlParameter("@pradd",ParmanentAdd ));
command.Parameters.Add(new SqlParameter("@lcadd", LocalAdd));
command.Parameters.Add(new SqlParameter("@email ",Email ));
command.Parameters.Add(new SqlParameter("@ccity",ClientCity ));
command.Parameters.Add(new SqlParameter("@thsil", Thesil));
command.Parameters.Add(new SqlParameter("@distr", district));
command.Parameters.Add(new SqlParameter("@state", state));
command.Parameters.Add(new SqlParameter("@con", Country));
command.Parameters.Add(new SqlParameter("@pin", PinCode.ToString()));
command.Parameters.Add(new SqlParameter("@conpr", ContactPerson));
command.Parameters.Add(new SqlParameter("@branm ", Branch));
command.Parameters.Add(new SqlParameter("@cladd", CActiveDate ));
command.Parameters.Add(new SqlParameter("@clldt", CLastLoginDate ));
command.Parameters.Add(new SqlParameter("@clilt", CLogintime.ToString()));
int i = command.ExecuteNonQuery();
return i;
}