Is there a good way to run a C# application on clientside in lieu of JavaScript?
ID: 647263 • Letter: I
Question
Is there a good way to run a C# application on clientside in lieu of JavaScript? I have done some front end work with JavaScript and backend C# for web developing at an old job, but I am interested in hosting a website myself soon. I have a C# application I would like to be open source, but before people care to download I'd like them to be able to use it. At its basic level it's a simple text editor, but there's much more to it in the nitty gritty. I could write it in JavaScript, but it would require me to keep documentation and up to date changes on JavaScript and C# in that case.
I was thinking of creating an AJAX panel and somehow loading my winform application into a frame, but I don't know how or what words to google because I've never done it before except AJAX.
Explanation / Answer
An ASP.NET WebForms application will be your best bet in the short term.
Your skills at WinForms will be largely transferable, however you'll need to make yourself familiar with where you're WinForm is relying on persisted state objects. These pieces of data that need to be persisted throughout the lifetime of the application, that are not part of server-side controls themselves, will need to be manually persisted via either the ViewState or Session state.
WebForms is not an ideal technology for the stateless web, but it was designed for developers that are familiar with Winform development.
Diving into full-blown stateless MVC has a considerable learning curve if you aren't used to web development.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.