c# can only be used server side with something like ASP or ASP.NET so strictly speaking you're not adding it to an HTML page. Having said that, ASP is added inside script blocks within the html itself eg:
<html>
<head><title></title></head>
<body>
<%
'you can add your code here
%>
</body>
</html>