How can I add a c# code to HTML?

Ratchetr

New member
If by active you mean only one of them can be checked, you don't need code for that. HTML knows how to do that already.

Assuming you are talking about an asp.NET page here, just use an <asp:radiobuttonlist> on your page.

If you are talking about raw HTML, just set the name attribute of each radio button to the same value.
 
If by active you mean only one of them can be checked, you don't need code for that. HTML knows how to do that already.

Assuming you are talking about an asp.NET page here, just use an <asp:radiobuttonlist> on your page.

If you are talking about raw HTML, just set the name attribute of each radio button to the same value.
 
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>
 
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>
 
Back
Top