Bhavesh Vankar

Bhavesh Vankar

  • 761
  • 1.1k
  • 86.9k

Press save button but no action is taken.

Mar 12 2021 9:19 AM
i have done below code to convert image control image into binary (IMAGE1.ImageUrl) but when i press save button their is no effect and not response from page. means page not react anything its not save record and display any error. 
i have use (!IsPostBack)  property what to do...?
  1. string filepath = Server.MapPath(vImage.ImageUrl);  
  2. FileStream fs = new FileStream(vImage.ImageUrl, FileMode.Open, FileAccess.ReadWrite);  
  3. BinaryReader br = new BinaryReader(fs);  
  4. byte[] bytes = br.ReadBytes((Int32)fs.Length);  
  5. br.Close();  
  6. fs.Close();

Answers (3)