4

I am asking about the best tool that you used before to convert a c# windows forms application into asp.net? I already googled about this topic and found alot of tools but I want someone to recommend the best one based on his usage.

5 Answers 5

15

I really wouldn't recommend using a tool to do the conversion. Web applications and WinForms are fundamentally different, and should be designed differently. Even with the vast amount of Ajax kicking around these days, you still need to bear in mind the whole stateless HTTP model.

If you don't want to rethink the application, you might want to look into converting it to Silverlight 2.0 instead...

Sign up to request clarification or add additional context in comments.

2 Comments

Couldn't agree more... really not a good idea to attempt a flat translation.
+1 for not using a tool. If the Win app used the MVC pattern the model and controller could be shared between the two.
5

@Jon Skeet has the best advice. That said, let's examine the results of the Google link you provided. What would happen?

The majority of the on-topic (for the query) results are other programmers asking essentially the same question -- and getting essentially the same answer. Indeed, I only see one tool for this: A sample from CodeProject. In this tool, not only are the generated UIs barren and ugly, but there is the following big disclaimer:

Please note that it is not the intention of this article or the accompanying code sample to achieve a complete conversion between Windows Forms and Web Forms including all events and business logic. Due to the fundamentally different nature of the two programming models, this would be a fruitless attempt. Rather, we are targeting the user interface components themselves, mapping Windows Forms controls to appropriate Web Forms counterparts.

And therein lies the real rub: All it's doing is generating a (very rudimentary) UI based on your existing UI. All code, logic, flow and even navigation is up to you.

Bottom line: The reason there's isn't a tool that pops up front and center is because such a tool would be nigh-impossible to write, and would churn out (most likely) un-navigable, non-functional sites. While WinForms and WebForms, programmatically, look similar, they are actually quite different under the hood. No tool will be able to generate an entire site for you from nothing but a WinForms app -- the models are more dissimilar than they might appear.

At the end of the day, the best way to take a WinForms app and web-enable it is to have written said app such that all the business logic is encapsulated in its own DLL (or set thereof), and use those DLLs to drive the back-end of a new-from-scratch site. That way all you're developing is the front end and display support.

2 Comments

What about convert my windows forms into control and hosting them into aspx pages?
What would be the point? Simpler distribution? Go with ClickOnce instead.
5

VisualJS.NET is the solution you're looking for. Watch the videos

Comments

1

Maybe you wanna try VisualWebGui? With some adjustments it would be probably possible for you to run your Windows Forms app inside a browser window.

Comments

0

You could consider hosting your Windows Forms application via Remote Desktop or Citrix

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.