title: How can I display image in gridview with 3 tier architecture?
body: <p>For data access layer:</p>
  
  <p>Source:</p>
  
  <pre><code>public string insert_details(bisuness_object user_details)
  {
  
      SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
      con.Open();
      SqlCommand cmd = new SqlCommand("insert into tbl_rgsthome values(@firstname,@lastname,@emailid,@password,@address,@upload)", con);
      try
      {
          cmd.Parameters.AddWithValue("@firstname", user_details.firstname_value);
          cmd.Parameters.AddWithValue("@lastname", user_details.lastname_value);
          cmd.Parameters.AddWithValue("@emailid", user_details.emailid_value);
          cmd.Parameters.AddWithValue("@password", user_details.pass_value);
          cmd.Parameters.AddWithValue("@address", user_details.addr_value);
          cmd.Parameters.AddWithValue("@upload", user_details.fileupl_value);
        //cmd.Parameters.AddWithValue("@imagepath", user_details.imgpth_value);
          return cmd.ExecuteNonQuery().ToString();
      }
      catch (Exception show_error)
      {
          throw show_error;
      }
      finally
      {
          cmd.Dispose();
          con.Close();
          con.Dispose();
      }
  
  }
  </code></pre>
  
  <hr>
  
  <p>home.aspx:</p>
  
  <pre><code>public string getimage(object ob)
  {
      string img = @"/image/" + ob.ToString();
      return img;
  }
  
  protected void Button1_Click(object sender, EventArgs e)
  {
      if (FileUpload1.PostedFile != null  &amp;&amp; FileUpload1.PostedFile.FileName != "")
      {
  
          byte[] myimage = new byte[FileUpload1.PostedFile.ContentLength];
          HttpPostedFile Image = FileUpload1.PostedFile;
          Image.InputStream.Read(myimage, 0, (int)FileUpload1.PostedFile.ContentLength);
          bisuness_object bo = new bisuness_object();
          // cmd.Parameters.AddWithValue("@imagepath", ("@uploadimage") + filename);
          bo.firstname_value = TextBox1.Text;
          bo.lastname_value = TextBox2.Text;
          bo.emailid_value = TextBox3.Text;
          bo.pass_value = TextBox4.Text;
          bo.addr_value = TextBox6.Text;
          bo.fileupl_value = FileUpload1.FileName.ToString();
          bisuness_layer bl = new bisuness_layer();
          bind();
  
          try
          {
              string result = bl.record_insert(bo);
          }
          catch (Exception info)
          {
              throw info;
          }
          finally
          {
              bo = null;
              bl = null;
              bind();
          }
          TextBox1.Text = "";
          TextBox2.Text = "";
          TextBox3.Text = "";
          TextBox4.Text = "";
          TextBox5.Text = "";
          TextBox6.Text = "";
      }
  }
  </code></pre>
  
  <p>how to solve it.....please help me
  i want to image in gridview </p>