Click here to Skip to main content
15,883,749 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Heloo,

I need to access native mobile camera through my asp.net web application which runs in the mobile browsers to capture and save the images to database.

How can i achieve this.

Thanks in advance.
Posted

1 solution

You can use input type file and accept image. Meaning the user has the option to select the camera.
https://developer.mozilla.org/en-US/docs/Web/API/Camera_API/Introduction[^]

Good luck!
 
Share this answer
 
Comments
Member 11849116 6-Oct-15 4:27am    
Thanks a lot Nijoboer..

But i have an issue. when i click on choose file and when i capture using the camera i am not able to get the preview and the samw issue with the image selected from a local folder.

Kindly help me out.

Awaiting your reply. Thanks in advance
E.F. Nijboer 6-Oct-15 7:13am    
For that you need to use html5 upload features. This also requires the server to support it to work.
http://www.codepool.biz/take-a-photo-and-upload-it-on-mobile-phones-with-html5.html
Member 11849116 6-Oct-15 8:30am    
Thanks a lot... It worked like a charm...!! CHEERS....!!!
Member 11849116 8-Oct-15 3:42am    
nijboer i have an issue when am using this in .aspx page in asp.net web application. when i click on browse button i am able to access my mobile camera which goes to video recorder by default and i am unable to switch to camera mode.
kindly help me out.
Thanks in advance
E.F. Nijboer 8-Oct-15 3:48am    
Normally you get to choose between video, camera or choose existing. Maybe you choose a default input method and maybe that could be the reason you don't get a choice anymore.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900