reaz
reaz

Reputation: 735

Uploading an image to ImageBox in asp.net C#

I want to upload an image to ImageBox on an Asp.net webpage. I am using C# language and for the browse I used <asp:FileUpload> tag. Any Ideas Please?

Regards

<asp:FileUpload ID="imgUpload" runat="server"  />

Upvotes: 1

Views: 10528

Answers (2)

XTGX
XTGX

Reputation: 114

try the links below i think these like can help. http://www.daniweb.com/forums/thread32985.html# http://www.daniweb.com/forums/thread112662.html#

Upvotes: 0

Adil
Adil

Reputation: 148160

You can assess uploaded file through FileUpload and save it using SaveAs method. You can read more over here.

string filename = Path.GetFileName(imgUpload.FileName);
FileUploadControl.SaveAs(Server.MapPath("~/") + filename);

Upvotes: 1

Related Questions