Below is a link to a free jQuery webcam plugin. I have not tried it out myself, but it looks promising.
http://www.xarg.org/project/jquery-webcam-plugin/[
^]
[EDIT]
I know you are asking for C# code, but you have to divide the development into a number of tasks. Ata minimum something along the lines of:
- Capture the video on the client side
- Transfer the video from the client to the server
- Store the video on the server.
If the jQuery plugin gets the first two steps done for you, it will be a lot quicker for you to complete development of the feature.
Here is a link to a forum thread. Go to the second page to learn how the poster solved it in their application.
http://forums.asp.net/t/1911753.aspx/1[
^]
[/EDIT]
Soren Madsen