Why cant you store procedure for that
1St create a store Procedure like this
Here Pass coloum datatypeis varbinary(MAX) in table
create procedure [dbo].[SP_Insert]
(@username varchar(20),@password varchar(20),@Pass varbinary(max))
as begin
insert into Table1(username ,password ,Pass ) values (@username,@password,@Pass)
end
/////////////// In C# code you can write code like this
byte[] Pass = GetSHA1(Email, Passtxt);
string connectString = System.Configuration.ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ToString();
SqlConnection con=new SqlConnection(connectString );
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "SP_Insert";
cmd.Connection = con;
con.open();
cmd.Parameters.Add("@username",name.Text );
cmd.Parameters.Add("@password",pass.Text );
cmd.Parameters.Add("@Pass",Pass );
cmd.ExecuteReader();
con.close()
Hope this may help you..........................................