Author: Disposed | Posted on: 7/28/2009 6:17:58 AM | Views : 1027

Hello,


I have a web form where I have a textbox and a button.
When the user clicks on the button I read the Text from the textbox, which is meant to be an Image title and retrive the corresponding image from the Database.
I am currently using Response.BinaryWrite but I wish to keep the above controls visible in the webpage.
protected void btnShow_Click(object sender, EventArgs e)
    {
        try
        {
            string query = "SELECT title,data,contenttype FROM images WHERE title = '" + txtImgTitle.Value + "'";
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Images_ConnectionString"].ConnectionString);
      ...

Go to the complete details ...