C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




The Process of Uploading and Viewing Photos


Posted Date: 09 Jun 2008    Resource Type: Code Snippets    Category: ASP.NET WebForms
Author: R O B I NMember Level: Gold    
Rating: Points: 4



Try this:

- Create a folder in your application which will store the image.

There can be two cases here:
1) you are either saving the image in the folder, or
2) your are saving the image in a database in binary format.

if you are saving the image in the folder, and if you are saving the path of the same in the database then I hope you shouldn't have any problem.

In your case I would suggest you to try to create a folder in your application and then try to upload image in that folder.


String path = Server.MapPath("~/UploadedImages/");

String fileExtension = System.IO.Path.GetExtension(fupldPhoto.FileName).ToLower();

imgEmpPhoto.ImageUrl = "~/UploadedImages/" + txtEmpCd.Text.Trim() + "_Image" + fileExtension;


In this code UploadedImages is the folder I have created in the application. fupldPhoto is the user control name to upload file. imageEmpPhoto is the Image User control name. txtEmpCd is the employee code whose images is being uploaded.




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Viewing photos in asp.net  .  Uploading images using asp.net  .  Uploading images  .  Uploading an image  .  Image uploading  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Content Transfer between two Listboxes
Previous Resource: How to Export Selected Rows in GridView to ExcelSheet
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET WebForms


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use