Posted on: 10/29/2012 1:24:20 AM | Views : 245

Can s
string strcon = ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindGridData(); } } /// <summary> /// btnUpload_Click event is used to upload images into database /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnUpload_Click(object sender, EventArgs e) { //Condition to check if the file uploaded or not if (fileuploadImage.HasFile) { //getting length of uploaded file int length = fileuploadImage.PostedFile.ContentLength; //create a byte array to store the binary image data byte[] imgbyte = new byte[length]; //store the currently selected file in memeory HttpPostedFile img = fileuploadImage.PostedFile; //set the binary data img.InputStream.Read(imgbyte, 0, length); string imagename = txtImageName.Text; //use the web.config to store the conn ...

Go to the complete details ...