Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
How Do You Program Using C# In An HTML File?
I'm not all that great at either HTML or C#, but I definitely prefer C# over HTML because I can understand and work with it better.
This brings me to an issue: how to program a webpage in the C# language.
I've so far been unable to locate anything online that will allow this. The closest I got was something called ASP.NET, but from what I gather, it requires you to learn a variant of C#, which I'm unwilling to do.
Unable to find this, I thought of a few ways to work around this.
One way I thought of was to embed a .CS file into a webpage, although I've no idea how to do this.
Another way is to just create a separate program and have it download and install to the user's cache, and auto-open when done. Like the previous thought, though, I've no idea how this would be achieved, and I've had no success looking for the solutions online.
To summarize, first, if there is a way (preferably simple) that I could code in the C# language on a webpage, I would appreciate further information on how to achieve this.
Secondly, if this is not feasible or possible, if there is a way to simply link a .CS file inside an HTML file in such a way to allow it to run, I would appreciate an explanation on how that would be accomplished.
Thirdly, if all of that is not possible, a run-down on how I would download, install, and auto-run a program from a user's cache would be awesome.
Thank you for your time and thank you in advance if you're able and willing to help.
I appreciate it greatly.
2 Answers
- ?Lv 59 years agoFavorite Answer
c#.net isn't much different from c# it's just a later version and to get code like c# to run on a server it requires the .net extensions (usually only on windows servers) using ASP files. That's what I believe any way.
Microsofts Visual Web Developer may be all you need to get a site coded using .net if you're comfortable in c# then ASP.net won't be difficult. You should always be willing to lean new languages!
Even if you did want to only use c# then you would still need to know HTML, CSS and maybe javascript in order to get a functioning site.
You can embed c# into a html file using
<script language="c#">
But I've never tried it or had the need but would guess it needs ASP.net to run. Microsoft web systems have always been a pain to learn for me. PHP is much simpler and the servers don't cost as much.
- peteamsLv 79 years ago
Web pages pretty much need to be coded in HTML if the are to be useful. HTML, CSS and JavaScript are what web browsers are built to render.
The closest practical thing to what you're proposing would be Silverlight, that enables user interfaces to be coded with a XAML front-end driven by C# on the client-side.


