1

I just started learning ASP.NET and HTML5, and looking for experts inputs. I'm exploring the possibility of reusing a .NET C# library (data model) that was previously used in a WPF project (a graphical editor) now being ported to HTML5. At the core, the data model library uses the ObservableCollection and ObservableDictionary class extensively, and relies on CollectionChanged and PropertyChanged events to update the views.

So far I've found two ways to access methods on the data model library from Javascript, but still can't figure out how to deal with the events which are essential to the application.

  1. Using PageMethods in ASP.NET AJAX
  2. Convert the .NET library to COM and load activeX object with Javascript

Thanks,

DM

4
  • 1
    You're making a horrible mistake. Web applications and desktop applications work in very different ways (unless you're using SilverLight). Commented Jan 4, 2012 at 0:21
  • We have looked at SilverLight. The data model works well with SL but it has its own host of problems. Commented Jan 4, 2012 at 0:27
  • You should go back to the fundamental reason why you're converting from WPF to html5. Converting to a COM ActiveX would likely violate those reasons ... Commented Jan 4, 2012 at 0:40
  • I have no idea what you're really asking here. Please clarify if you can. Commented Jan 4, 2012 at 1:07

1 Answer 1

1

As far as I know there is no easy way to directly relate javascript with any kind of propertychanged handlers, because the page has no lifespan. It is created, sent to the browser and disposed of. Any dynamic work will either need to be done on the DOM (using Javascript) or requested from new pages (either javascript / ajax for seemless approach, or "reloading" the page).

You should take a look at Silverlight if they must have a web based version of this application, as it allows much more than just HTML/Javascript.

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

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.