Author: Anoop Mohanan | Posted on: 2/7/2010 11:17:00 PM | Views : 268

I have a datalist for displaying images randomly from database.The code is given below.
protected void imagebind()
    {
        string strConnection = ConfigurationSettings.AppSettings["carcon"];
        SqlConnection image_con = new SqlConnection(strConnection);
        try
        {
            int min, max;
            string photoid_list = "";
            string image_query = "select min(photoid),max(photoid) from photo";
            SqlCommand image_cmd = new SqlCommand(image_query, image_con);
      ...

Go to the complete details ...