If you want to use C# code, then basically your only alternative is to write a
Silverlight application. This will run in many browsers, but not ALL of them.
Since you asked in the Training and Certification forum, let me suggest a training course that can prepare you for writing Silverlight: Course 10554:
http://www.microsoft.com/learning/en-us/course.aspx?id=10554a