- string filename = Path.GetFileName(FileUpload1.PostedFile.FileName);
- string contenttype = FileUpload1.PostedFile.ContentType;
- using (Stream fs = FileUpload1.PostedFile.InputStream)
- {
- using (BinaryReader br = new BinaryReader(fs))
- {
- byte[] bytes = br.ReadBytes((Int32)fs.Length);
- }
- }
- }
How to replace Fileupload to Image.imageurl
how to replace Image1.ImageUrl to Fileupload1 in below code.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Bhavesh VankarRank #1,147 · 1.6K reputationPosted Mar 10, 2021, 6:37 AM EST
Rijwan AnsariRank #82 · 24.2K reputationPosted Mar 10, 2021, 10:39 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Mar 10, 2021, 10:55 AM EST