ajax slide show get images from database
<p>i had sideshow ajax and i want it get images form database 
i used sql server  2000 and i had binary images</p>

<p>this is my code to select images from database</p>

<pre><code>public class SlidShow : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        using (SqlConnection con = Connection.GetConnection())
        {
            string Sql = "Select image from SlideShowImage Where  Active=1 And Hig_Id=@Hig_Id";
            System.Data.SqlClient.SqlCommand com = new SqlCommand(Sql, con);
            com.CommandType= System.Data.CommandType.Text;
            com.Parameters.Add(Parameter.NewInt("@Hig_Id", context.Request.QueryString["Hig_ID"].ToString()));

            System.Data.SqlClient.SqlDataReader dr = com.ExecuteReader();
            if (dr.Read() &amp;&amp; dr != null)
            {

                Byte[] bytes1 = (Byte[])dr["image"];

                context.Response.BinaryWrite(bytes1);

                dr.Close();
            }
        }
    }
</code></pre>

<hr>

<pre><code>  [System.Web.Services.WebMethod]
    [System.Web.Script.Services.ScriptMethod]

    public static AjaxControlToolkit.Slide[] GetSlides()
    {


        return new AjaxControlToolkit.Slide[] { 
            new AjaxControlToolkit.Slide("images/sharp_highlight_ref_img.jpg", "", ""),
             new AjaxControlToolkit.Slide("images/products_fridg_img.jpg", "", ""),
            new AjaxControlToolkit.Slide("images/sharp_home_highlight_img.jpg", "", "")


        };

    }
}
</code></pre>
