silverlight - C# objects use from javascript in a HTML based webpage -


i building asp net website in visual studio uses razor developed html pages. able use c# javascript on 1 of web pages (this not creating plugin displayed in browser.) have tried create simple cs class has single method returns fixed string test this. following code in managedcsclass.cs file in app_code folder in project.

[system.runtime.interopservices.comvisibleattribute(true)] public class managedcsclass {     public managedcsclass()     {         //         // todo: add constructor logic here         //     }     public string returntext()     {         return "text managedcsclass";     } } 

what not clear on create object used html page (in same .cs file class, .cs file, or call html browser page).

and code need use in javascript reference object/method?

thanks or guidance can provide. mark

you trying use "activex" com objects, requires dll containing class registered on client , have lot of security/deploy issues ( client must trust object , have framework installed ). not best way create web app today.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -