I'm planning to build a community website (with multiple user accounts) - something a bit like facebook+youtube. I'm trying to plan the whole "back-end" properly but don't have enough experience yet so need help from professionals.

Most of all, I cannot decide which language to use to program the client and the server side. I'm a C# programmer but for the website, I'm trying to find a free technology (ie. Linux-based). I want to use as few languages as possible - preferably just one (but that's probably impossible in web development) - I really hate that to build even the simpliest website you need to use HTML, CSS, JavaScript, PHP, SQL and f**k knows what else. I really hate such mess. Ideally, I want the language to generate the necessary HTML/CSS by itself - ie. when I command it to create a centered TextBox, I want it to automatically create a DIV with a paragraph inside and set its margins and paddings in the parent container accordingly.

I also want to use the same one language for client and server side coding.

I've recently started to look at Ruby on Rails (but it doesn't seem to be capable of doing what I need - it's only server-side) and Server Side JavaScript.

Thanks in advance for constructive advice!