Sundas Ali

Sundas Ali

  • 1.9k
  • 7
  • 4.3k

How to upload picture in registration form

Jul 15 2016 11:59 AM
i want to upload picture in registration form
table columns are
Reg_id int
Name varchar(50),
Address  varchar(50),
Mobile varchar(50),
Email varchar(50), 
Password varchar(50) 
Image varchar(50)
 
i also search but there is always separate table of image, and i want image in register table
please guide me
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(conString);
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "SP_INSERT_reg";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Reg_id", HF_Reg_Id.Value);
cmd.Parameters.Add("@Fname", Fname.Text);
cmd.Parameters.Add("@Address ", Address .Text);
cmd.Parameters.Add("@Mobile ", Mobile .Text);
cmd.Parameters.Add("@Password ", Password .Text);
cmd.Parameters.Add("@Image ", Image .____; );
cmd.Connection = con;
con.Open();
string result = cmd.ExecuteNonQuery().ToString();
con.Close();
 
 
 

Answers (2)