Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
image is not displaying in image control after selecting file from fileuploader control in c#asp.net
August 07, 2010
I have created a web page in my project in which I ahve added only 3 controls file uploader,button,image control.After selecting image file from file uploader and on clicking button image.imageurl doesnot show the image. While the same code is working nicely in other small project. My code is :
protected void Button1_Click(object sender, EventArgs e)
string filename = System.IO.Path.GetFileName(FileUpload1.FileName);
FileUpload1.SaveAs(Server.MapPath("~/") + filename);
Image1.ImageUrl = filename;
catch (Exception ex)
plz let me know what is the problem in this code.Why image control is not showing image. Plz reply soon its very urgent.
Thanks & regards,
Syed Shakeer Hussain
Posted Date: August 07, 2010 Points: 5
Check this links you will find your solution:-
To post reply
Related Questions Related Questions
Web Browser control will not displaying image
how to upload default image into database when no image file is selected from fileupload control in
Image display in image control
How can I display a picture in an Image Control?
how to show image in imagebox/picturebox on selection of image file from fileuploader
how to retreive and show image in image control in asp.net,c#
Picture select from gridview click show in image control
how to insert image from selected image in IMAGE CONTROL in asp.net
Insert image in Web browser control in Windows forms
upload image file in windows application
Latest Forum Questions From The Same Category
how to learn and Where can i Learn about ASP .Net
Slash(/) in Combobox
attaching the report in the web page
How do i get payment status in redirect page using bitpay?
Login with Facebook and Save details in database
Login with facebook account in my website
How to make a nested datalist control?
What class does Icon derive from?
What are the validation controls?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend